From 8f4adae408b298ddfda407938e2e35063a3ef017 Mon Sep 17 00:00:00 2001 From: panticmilos Date: Wed, 10 Aug 2022 20:44:17 +0200 Subject: [PATCH] Change condition --- dist/setup/index.js | 4 +++- src/main.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 7b3f5dc..08d77d5 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63150,7 +63150,9 @@ function run() { const cache = core.getBooleanInput('cache'); core.info(`Setup go version spec ${versionSpec}`); let arch = core.getInput('architecture'); - arch = arch ? arch : os_1.default.arch(); + if (!arch) { + arch = os_1.default.arch(); + } if (versionSpec) { let token = core.getInput('token'); let auth = !token || cache_utils_1.isGhes() ? undefined : `token ${token}`; diff --git a/src/main.ts b/src/main.ts index e4062df..8648d4d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,7 +21,10 @@ export async function run() { core.info(`Setup go version spec ${versionSpec}`); let arch = core.getInput('architecture'); - arch = arch ? arch : os.arch(); + + if (!arch) { + arch = os.arch(); + } if (versionSpec) { let token = core.getInput('token');