From 41182fa2c491e19f26d34e831593882ea0e9c861 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 11:19:57 +1300 Subject: [PATCH] Ensure bin path exists Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com> --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 117ac92..cdf6e2a 100644 --- a/index.js +++ b/index.js @@ -37,6 +37,10 @@ async function downloadRelease(octokit, os, org, repo, release, token) { execSync(`curl -L -o ${archive} ${asset.browser_download_url}`) } + // Ensure the that the install target exists + console.log("Preparing install target...") + fs.mkdirSync(binpath) + // Extract the archive into the install target console.log("Unpacking archive file...") execSync(`cd "${binpath}" && ${extract} ${archive}`)