fix: baseLocation

This commit is contained in:
peaceiris 2019-11-22 10:35:30 +09:00
parent e372b56bb7
commit 38963a7f40
2 changed files with 8 additions and 13 deletions

View file

@ -5168,14 +5168,11 @@ function installer(version) {
baseLocation = process.env['USERPROFILE'] || 'C:\\'; baseLocation = process.env['USERPROFILE'] || 'C:\\';
} }
else { else {
if (process.platform === 'darwin') { baseLocation = `${process.env.HOME}`;
baseLocation = '/Users';
}
else {
baseLocation = '/home';
}
} }
const hugoPath = path.join(baseLocation, 'actions', 'bin'); console.log(`${process.env.HOME}`);
console.log(baseLocation);
const hugoPath = path.join(baseLocation, 'hugobin');
yield io.mkdirP(hugoPath); yield io.mkdirP(hugoPath);
core.addPath(hugoPath); core.addPath(hugoPath);
const hugoAssets = yield tc.downloadTool(hugoURL); const hugoAssets = yield tc.downloadTool(hugoURL);

View file

@ -20,13 +20,11 @@ export default async function installer(version: string) {
if (process.platform === 'win32') { if (process.platform === 'win32') {
baseLocation = process.env['USERPROFILE'] || 'C:\\'; baseLocation = process.env['USERPROFILE'] || 'C:\\';
} else { } else {
if (process.platform === 'darwin') { baseLocation = `${process.env.HOME}`;
baseLocation = '/Users';
} else {
baseLocation = '/home';
}
} }
const hugoPath: string = path.join(baseLocation, 'actions', 'bin'); console.log(`${process.env.HOME}`);
console.log(baseLocation);
const hugoPath: string = path.join(baseLocation, 'hugobin');
await io.mkdirP(hugoPath); await io.mkdirP(hugoPath);
core.addPath(hugoPath); core.addPath(hugoPath);