diff --git a/lib/index.js b/lib/index.js index 19354c7..073df90 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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); diff --git a/src/installer.ts b/src/installer.ts index b9ba6ec..a1db3ef 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -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);