mirror of
https://github.com/actions/setup-java.git
synced 2025-07-18 12:38:20 +02:00
Use console.log where appropriate
This commit is contained in:
parent
24327359f8
commit
b8a0027e2c
3 changed files with 9 additions and 7 deletions
|
@ -25,14 +25,14 @@ exports.SETTINGS_FILE = 'settings.xml';
|
|||
function configAuthentication(id, username, password) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (id && username && password) {
|
||||
core.debug(`configAuthentication with ${username} and a password`);
|
||||
console.log(`creating ${exports.SETTINGS_FILE} with server-id: ${id}, username: ${username}, and a password`);
|
||||
const directory = path.join(os.homedir(), exports.M2_DIR);
|
||||
yield io.mkdirP(directory);
|
||||
core.debug(`created directory ${directory}`);
|
||||
yield write(directory, generate(id, username, password));
|
||||
}
|
||||
else {
|
||||
core.debug(`no auth without username: ${username} and password: ${password}`);
|
||||
core.debug(`no ${exports.SETTINGS_FILE} without server-id: ${id}, username: ${username}, and a password`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ function write(directory, settings) {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const options = { encoding: 'utf-8' };
|
||||
const location = path.join(directory, exports.SETTINGS_FILE);
|
||||
core.debug(`writing ${location}`);
|
||||
console.log(`writing ${location}`);
|
||||
return fs.writeFileSync(location, settings, options);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue