mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Allow for alternate settings.xml file location
Use the m2-home to specify a new location for the settings.xml file
This commit is contained in:
parent
4757680fc9
commit
ae11e1a1b6
4 changed files with 36 additions and 4 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -4134,7 +4134,9 @@ function configAuthentication(id, username, password) {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (id && username && 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);
|
||||
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
||||
// otherwise use the home/.m2/ path
|
||||
const directory = path.join(core.getInput('m2-home') || os.homedir(), core.getInput('m2-home') ? '' : exports.M2_DIR);
|
||||
yield io.mkdirP(directory);
|
||||
core.debug(`created directory ${directory}`);
|
||||
yield write(directory, generate(id, username, password));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue