From 05082d6398135005af6bf953c951bedab6d38799 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:55:50 +1300 Subject: [PATCH] Correct all references to hardcoded filename Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 041f229..812aa43 100644 --- a/index.js +++ b/index.js @@ -29,10 +29,10 @@ async function downloadRelease(octokit, os, org, repo, release, token) { execSync("sudo mkdir -p /usr/local/lib/gotestfmt") console.log("Unpacking tar file...") - execSync("cd /usr/local/lib/gotestfmt && sudo tar -xvzf /tmp/gotestfmt.tar.gz") + execSync(`cd /usr/local/lib/gotestfmt && sudo tar -xvzf ${tempdir}/gotestfmt${postfix}`) console.log("Removing tarball...") - fs.unlinkSync("/tmp/gotestfmt.tar.gz") + fs.unlinkSync(`${tempdir}/gotestfmt${postfix}`) console.log("Creating /usr/local/bin directory if it does not exist already...") execSync("sudo mkdir -p /usr/local/bin")