mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +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
|
@ -16,7 +16,12 @@ export async function configAuthentication(
|
|||
console.log(
|
||||
`creating ${SETTINGS_FILE} with server-id: ${id}, username: ${username}, and a password`
|
||||
);
|
||||
const directory: string = path.join(os.homedir(), M2_DIR);
|
||||
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
||||
// otherwise use the home/.m2/ path
|
||||
const directory: string = path.join(
|
||||
core.getInput('m2-home') || os.homedir(),
|
||||
core.getInput('m2-home') ? '' : M2_DIR
|
||||
);
|
||||
await io.mkdirP(directory);
|
||||
core.debug(`created directory ${directory}`);
|
||||
await write(directory, generate(id, username, password));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue