From 6f8a8b87eb95fd6e29608045162fe10e261b9fe6 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:08:50 +1300 Subject: [PATCH] USe GOOs Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 812aa43..4cf184f 100644 --- a/index.js +++ b/index.js @@ -99,6 +99,10 @@ async function determineOS() { return os } +async function determineGOOS() { + return process.env.GOOS; +} + async function main() { try { // versionPrefix is the prefix of the version gotestfmt-action supports. @@ -110,7 +114,7 @@ async function main() { const octokit = new Octokit({ auth: token, }) - const os = await determineOS() + const os = (await determineGOOS() || await determineOS()) await downloadGofmt(octokit, version, versionPrefix, os, org, repo, token) console.log("Setup complete.") } catch (error) {