mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-08 00:37:27 +00:00
Use more meaningful name for binpath
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
ed405a8b57
commit
f365aa2590
1 changed files with 2 additions and 3 deletions
5
index.js
5
index.js
|
|
@ -13,7 +13,7 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
|||
const postfix = `_${os}_amd64.${os === "windows" ? "zip" : "tar.gz"}`;
|
||||
const pathsep = os === "windows" ? "\\" : "/";
|
||||
const tempdir = os === "windows" ? process.env.TEMP : "/tmp";
|
||||
const libpath = os === "windows" ? process.env.USERPROFILE + "\\bin" : "/usr/local/bin";
|
||||
const binpath = os === "windows" ? process.env.USERPROFILE + "\\bin" : "/usr/local/bin";
|
||||
const extract = os === "windows" ? "tar -xvf " : "tar -xvzf";
|
||||
const archive = `${tempdir}${pathsep}gotestfmt${postfix}`;
|
||||
|
||||
|
|
@ -30,13 +30,12 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
|||
}
|
||||
|
||||
console.log("Unpacking archive file...")
|
||||
execSync(`cd ${libpath} && ${extract} ${archive}`)
|
||||
execSync(`cd ${binpath} && ${extract} ${archive}`)
|
||||
|
||||
console.log("Removing asset archive...")
|
||||
fs.unlinkSync(`${archive}`)
|
||||
|
||||
console.log("Successfully set up gotestfmt.")
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue