style: 💄 Fix format

This commit is contained in:
peaceiris 2019-09-21 10:11:39 +09:00
parent 286eb0a87e
commit 1554388ab7
5 changed files with 42 additions and 41 deletions

View file

@ -27,7 +27,7 @@ const get_url_1 = __importDefault(require("./get-url"));
function installer(version) {
return __awaiter(this, void 0, void 0, function* () {
try {
const extended = core.getInput("extended");
const extended = core.getInput('extended');
console.log(`Hugo extended: ${extended}`);
const osName = get_os_1.default(process.platform);
console.log(`Operating System: ${osName}`);
@ -38,13 +38,13 @@ function installer(version) {
core.addPath(hugoPath);
// Download and extract Hugo binary
const hugoAssets = yield tc.downloadTool(hugoURL);
let hugoBin = "";
if (osName === "Windows") {
const hugoExtractedFolder = yield tc.extractZip(hugoAssets, "/tmp");
let hugoBin = '';
if (osName === 'Windows') {
const hugoExtractedFolder = yield tc.extractZip(hugoAssets, '/tmp');
hugoBin = `${hugoExtractedFolder}/hugo.exe`;
}
else {
const hugoExtractedFolder = yield tc.extractTar(hugoAssets, "/tmp");
const hugoExtractedFolder = yield tc.extractTar(hugoAssets, '/tmp');
hugoBin = `${hugoExtractedFolder}/hugo`;
}
yield io.mv(hugoBin, hugoPath);