feat: Use path.join

This commit is contained in:
peaceiris 2019-11-22 10:14:25 +09:00
parent 1490c6e417
commit 28dbdfa364

View file

@ -3,6 +3,7 @@ import * as tc from '@actions/tool-cache';
import * as io from '@actions/io'; import * as io from '@actions/io';
import getOS from './get-os'; import getOS from './get-os';
import getURL from './get-url'; import getURL from './get-url';
import * as path from 'path';
export default async function installer(version: string) { export default async function installer(version: string) {
try { try {
@ -15,7 +16,7 @@ export default async function installer(version: string) {
const hugoURL: string = getURL(osName, extended, version); const hugoURL: string = getURL(osName, extended, version);
core.debug(`hugoURL: ${hugoURL}`); core.debug(`hugoURL: ${hugoURL}`);
const hugoPath: string = `${process.env.HOME}/bin`; const hugoPath: string = path.join(`${process.env.HOME}`, 'bin');
await io.mkdirP(hugoPath); await io.mkdirP(hugoPath);
core.addPath(hugoPath); core.addPath(hugoPath);