From b1d9a329736d89bb687f418f5879004c51735aa9 Mon Sep 17 00:00:00 2001 From: Yuri Norwood <106889957+norwd@users.noreply.github.com> Date: Mon, 7 Nov 2022 14:29:34 +1300 Subject: [PATCH] Add callback to file move 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 c0faa3c..669debe 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,11 @@ async function downloadRelease(octokit, os, org, repo, release, token) { // Extract the archive into the install target console.log("Unpacking archive file...") execSync(`${extract} "${archive}"`) - fs.rename("gotestfmt", `${binpath}/gotestfmt`) + fs.rename("gotestfmt", `${binpath}/gotestfmt`, function (err) { + if (err) { + throw err; + } + }); // Remove the downloaded asset archive console.log("Removing asset archive...")