From f365aa2590bb9bed74ed83effba6af4afa9784bd Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:40:37 +1300 Subject: [PATCH] Use more meaningful name for binpath Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 46c44f6..6042e53 100644 --- a/index.js +++ b/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 } }