🧑‍💻 fix rmDirSync error on windows

This commit is contained in:
Nate Sesti 2024-02-28 00:18:24 -05:00
parent 08ac136089
commit 5f72ac6033

View file

@ -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
});
}
}