mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-19 00:00:25 +08:00
home path on windows
This commit is contained in:
13
index.js
13
index.js
@ -8,10 +8,17 @@ const settings = require('./settings');
|
|||||||
async function run() {
|
async function run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const settingsPath = path.join(process.env.HOME, '.m2', 'settings.xml');
|
var settingsPath;
|
||||||
core.info('Prepare maven setings: ' + settingsPath);
|
try {
|
||||||
|
settingsPath= path.join(process.env['HOME'], '.m2', 'settings.xml');
|
||||||
|
} catch (error) {
|
||||||
|
console.log("HOME=" + process.env['HOME']);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
if ( fs.existsSync(settingsPath) ) {
|
core.info('Prepare maven setings: ' + settingsPath);
|
||||||
|
|
||||||
|
if (fs.existsSync(settingsPath)) {
|
||||||
core.warning('maven settings.xml already exists - skip');
|
core.warning('maven settings.xml already exists - skip');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user