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:\\';
}
else {
if (process.platform === 'darwin') {
baseLocation = '/Users';
}
else {
baseLocation = '/home';
}
baseLocation = `${process.env.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);
core.addPath(hugoPath);
const hugoAssets = yield tc.downloadTool(hugoURL);

View file

@ -20,13 +20,11 @@ export default async function installer(version: string) {
if (process.platform === 'win32') {
baseLocation = process.env['USERPROFILE'] || 'C:\\';
} else {
if (process.platform === 'darwin') {
baseLocation = '/Users';
} else {
baseLocation = '/home';
}
baseLocation = `${process.env.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);
core.addPath(hugoPath);