reindent
This commit is contained in:
parent
053422e2e1
commit
b836447fac
1 changed files with 27 additions and 28 deletions
7
index.js
7
index.js
|
@ -7,12 +7,10 @@ const getLatestVersion = require("./get-latest-version");
|
|||
// most @actions toolkit packages have async methods
|
||||
async function run() {
|
||||
try {
|
||||
getLatestVersion().then(function(latestVersion) {
|
||||
let hugoVersion = core.getInput("hugo-version");
|
||||
if (!hugoVersion || hugoVersion === "latest") {
|
||||
hugoVersion = "0.58.2";
|
||||
getLatestVersion().then(function(version) {
|
||||
console.log(version);
|
||||
});
|
||||
hugoVersion = latestVersion;
|
||||
}
|
||||
core.debug(`Hugo version: ${hugoVersion}`);
|
||||
|
||||
|
@ -41,6 +39,7 @@ async function run() {
|
|||
const hugoExtractedFolder = await tc.extractTar(hugoTarball, "/tmp");
|
||||
core.debug("hugoExtractedFolder:", hugoExtractedFolder);
|
||||
await exec.exec("sudo", ["mv", `${hugoExtractedFolder}/hugo`, hugoPath]);
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue