summaryrefslogtreecommitdiff
path: root/tools/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/util.js')
-rw-r--r--tools/util.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/util.js b/tools/util.js
index 75ee1b527..1497a2887 100644
--- a/tools/util.js
+++ b/tools/util.js
@@ -227,6 +227,12 @@ export async function downloadPrebuilt(toolName) {
);
}
spinner.text = `Successfully downloaded: ${toolName}`;
+ try {
+ // necessary on Windows it seems
+ await Deno.remove(toolPath);
+ } catch {
+ // ignore
+ }
await Deno.rename(tempFile, toolPath);
} catch (e) {
spinner.fail();