From 7dc6b91140c7448be8854f9b29473c6a67d65da0 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:07:51 +1300 Subject: [PATCH] Correctly identify windows os Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 8fa3c3c..5ba8bb9 100644 --- a/index.js +++ b/index.js @@ -74,6 +74,12 @@ async function downloadGofmt(octokit, version, versionPrefix, os, org, repo, tok async function determineOS() { const os = execSync("uname").toString().trim().toLowerCase() + + if (os.indexOf("msys_nt") === 0) + { + os = "windows"; + } + console.log(`Running on OS '${os}'`) return os }