Properly log GOOS detection

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
Yuri Norwood 2022-11-07 10:19:00 +13:00 committed by GitHub
parent 56245aa167
commit 5f6ce583a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,7 +81,7 @@ async function downloadGofmt(octokit, version, versionPrefix, os, org, repo, tok
async function determineOS() { async function determineOS() {
const uname = execSync("uname") const uname = execSync("uname")
os = uname.toString().trim().toLowerCase() let os = uname.toString().trim().toLowerCase()
if (os.indexOf("msys_nt") === 0) if (os.indexOf("msys_nt") === 0)
{ {
os = "windows"; os = "windows";
@ -93,7 +93,13 @@ async function determineOS() {
} }
async function determineGOOS() { async function determineGOOS() {
return process.env.GOOS; const goos = process.env.GOOS;
if (goos) {
console.log(`Running on GOOS '${goos}'`)
}
return goos;
} }
async function main() { async function main() {