mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-09 17:27:30 +00:00
Attempt to use pre-existing lib path instead of creating new one
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
f8b937725a
commit
9a4f739c73
1 changed files with 1 additions and 6 deletions
7
index.js
7
index.js
|
|
@ -13,7 +13,7 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
|||
// Determine environment specific details, paths etc...
|
||||
const postfix = `_${os}_amd64.${os === "windows" ? "zip" : "tar.gz"}`;
|
||||
const tempdir = os === "windows" ? process.env.TEMP + "\\" : "/tmp/";
|
||||
const binpath = os === "windows" ? "C:\\Program Files\\GoTestTools" : "/usr/local/bin";
|
||||
const binpath = os === "windows" ? "C:\\Windows\\System32" : "/usr/local/bin";
|
||||
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
||||
const archive = `${tempdir}gotestfmt${postfix}`;
|
||||
|
||||
|
|
@ -32,11 +32,6 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
|||
execSync(`curl -L -o ${archive} ${asset.browser_download_url}`)
|
||||
}
|
||||
|
||||
// Ensure the that the install target exists
|
||||
console.log("Preparing install target...");
|
||||
fs.mkdirSync(binpath, { recursive: true });
|
||||
core.addPath(binpath);
|
||||
|
||||
// Extract the archive into the install target
|
||||
console.log("Unpacking archive file...")
|
||||
execSync(`cd "${binpath}" && ${extract} ${archive}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue