mirror of
https://gitea.com/actions/setup-java.git
synced 2025-11-08 02:46:26 +08:00
Use console.log where appropriate
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user