🧑💻 fix rmDirSync error on windows
This commit is contained in:
parent
08ac136089
commit
5f72ac6033
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue