From 5f72ac603312ea8f43fa541afecc97b882b0ea38 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 00:18:24 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20fix=20rmDir?= =?UTF-8?q?Sync=20error=20on=20windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/scripts/prepackage.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 76af0d9a0..dd281e10f 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -172,18 +172,21 @@ if (args[2] === "--target") { if (target) { // If building for production, only need the binaries for current platform if (!target.startsWith("darwin")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/darwin"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/darwin"), { recursive: true, + force: true }); } if (!target.startsWith("linux")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/linux"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/linux"), { recursive: true, + force: true }); } if (!target.startsWith("win")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/win32"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/win32"), { recursive: true, + force: true }); } }