Skip to content

Commit b8a0027

Browse files
author
Bryan Clark
committed
Use console.log where appropriate
1 parent 2432735 commit b8a0027

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

lib/auth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ exports.SETTINGS_FILE = 'settings.xml';
2525
function configAuthentication(id, username, password) {
2626
return __awaiter(this, void 0, void 0, function* () {
2727
if (id && username && password) {
28-
core.debug(`configAuthentication with ${username} and a password`);
28+
console.log(`creating ${exports.SETTINGS_FILE} with server-id: ${id}, username: ${username}, and a password`);
2929
const directory = path.join(os.homedir(), exports.M2_DIR);
3030
yield io.mkdirP(directory);
3131
core.debug(`created directory ${directory}`);
3232
yield write(directory, generate(id, username, password));
3333
}
3434
else {
35-
core.debug(`no auth without username: ${username} and password: ${password}`);
35+
core.debug(`no ${exports.SETTINGS_FILE} without server-id: ${id}, username: ${username}, and a password`);
3636
}
3737
});
3838
}
@@ -56,7 +56,7 @@ function write(directory, settings) {
5656
return __awaiter(this, void 0, void 0, function* () {
5757
const options = { encoding: 'utf-8' };
5858
const location = path.join(directory, exports.SETTINGS_FILE);
59-
core.debug(`writing ${location}`);
59+
console.log(`writing ${location}`);
6060
return fs.writeFileSync(location, settings, options);
6161
});
6262
}

lib/setup-java.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function run() {
3131
yield installer.getJava(version, arch, jdkFile);
3232
const matchersPath = path.join(__dirname, '..', '.github');
3333
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
34-
const id = core.getInput('id', { required: false });
34+
const id = core.getInput('server-id', { required: false });
3535
const username = core.getInput('username', { required: false });
3636
const password = core.getInput('password', { required: false });
3737
if (id && username && password) {

src/auth.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ export async function configAuthentication(
1313
password: string
1414
) {
1515
if (id && username && password) {
16-
core.debug(`configAuthentication with ${username} and a password`);
16+
console.log(
17+
`creating ${SETTINGS_FILE} with server-id: ${id}, username: ${username}, and a password`
18+
);
1719
const directory: string = path.join(os.homedir(), M2_DIR);
1820
await io.mkdirP(directory);
1921
core.debug(`created directory ${directory}`);
2022
await write(directory, generate(id, username, password));
2123
} else {
2224
core.debug(
23-
`no auth without username: ${username} and password: ${password}`
25+
`no ${SETTINGS_FILE} without server-id: ${id}, username: ${username}, and a password`
2426
);
2527
}
2628
}
@@ -43,6 +45,6 @@ export function generate(id: string, username: string, password: string) {
4345
async function write(directory: string, settings: string) {
4446
const options = {encoding: 'utf-8'};
4547
const location = path.join(directory, SETTINGS_FILE);
46-
core.debug(`writing ${location}`);
48+
console.log(`writing ${location}`);
4749
return fs.writeFileSync(location, settings, options);
4850
}

0 commit comments

Comments
 (0)