From 7ed90a20d04982ae15a52ae2378cbffd4b6839df Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 5 Jun 2024 11:04:16 -0400 Subject: fix: better handling of npm resolution occurring on workers (#24094) Closes https://github.com/denoland/deno/issues/24063 --- tools/util.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') 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(); -- cgit v1.2.3