mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-09 17:27:30 +00:00
Add install directory to path
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
b119af5335
commit
1cc578bf16
1 changed files with 6 additions and 2 deletions
8
index.js
8
index.js
|
|
@ -13,10 +13,14 @@ 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 binpath = os === "windows" ? "C:\\Program Files" : "/usr/local/bin";
|
||||
const binpath = os === "windows" ? "C:\\Program Files\\GoTestTools" : "/usr/local/bin";
|
||||
const extract = os === "windows" ? "tar -xvf" : "tar -xvzf";
|
||||
const archive = `${tempdir}${pathsep}gotestfmt${postfix}`;
|
||||
|
||||
|
||||
if (os === windows) {
|
||||
execSync(`"${binpath}" >> $env:GITHUB_PATH`);
|
||||
}
|
||||
|
||||
console.debug("postfix: " + postfix);
|
||||
console.debug("pathsep: " + pathsep);
|
||||
console.debug("tempdir: " + tempdir);
|
||||
|
|
|
|||
Loading…
Reference in a new issue