From beae072e4dc0e03f90d01866371ba6a3d65167e8 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:29:09 +1300 Subject: [PATCH] Inline postfix declaration Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/index.js b/index.js index 4a4080d..bafff34 100644 --- a/index.js +++ b/index.js @@ -10,11 +10,7 @@ async function downloadRelease(octokit, os, org, repo, release, token) { release_id: release.id, }) - postfix = `_${os}_amd64.tar.gz` - - if (os === "windows") { - postfix = `_${os}_amd64.zip` - } + postfix = `_${os}_amd64.${os === "windows" ? "zip" : "tar.gz"}`; for (let asset of releaseAssets.data) { console.log("Examining release asset " + asset.name + " at " + asset.browser_download_url + " ...")