mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-21 15:11:46 +00:00
Correctly avoid assignment to const variable
Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
74659dabed
commit
026aad37c7
1 changed files with 4 additions and 3 deletions
7
index.js
7
index.js
|
|
@ -10,8 +10,7 @@ async function downloadRelease(octokit, os, org, repo, release, token) {
|
||||||
release_id: release.id,
|
release_id: release.id,
|
||||||
})
|
})
|
||||||
|
|
||||||
extension = os === "windows" ? "zip" : "tar.gz";
|
postfix = `_${os}_amd64.${os === "windows" ? "zip" : "tar.gz"}`;
|
||||||
postfix = `_${os}_amd64.${extension}`;
|
|
||||||
|
|
||||||
for (let asset of releaseAssets.data) {
|
for (let asset of releaseAssets.data) {
|
||||||
console.log("Examining release asset " + asset.name + " at " + asset.browser_download_url + " ...")
|
console.log("Examining release asset " + asset.name + " at " + asset.browser_download_url + " ...")
|
||||||
|
|
@ -77,14 +76,16 @@ async function downloadGofmt(octokit, version, versionPrefix, os, org, repo, tok
|
||||||
}
|
}
|
||||||
|
|
||||||
async function determineOS() {
|
async function determineOS() {
|
||||||
const os = execSync("uname").toString().trim().toLowerCase()
|
const uname = execSync("uname")
|
||||||
|
|
||||||
|
os = uname.toString().trim().toLowerCase()
|
||||||
if (os.indexOf("msys_nt") === 0)
|
if (os.indexOf("msys_nt") === 0)
|
||||||
{
|
{
|
||||||
os = "windows";
|
os = "windows";
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Running on OS '${os}'`)
|
console.log(`Running on OS '${os}'`)
|
||||||
|
|
||||||
return os
|
return os
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue