We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a69990 commit d7b14d6Copy full SHA for d7b14d6
scripts/copyExes.js
@@ -20,10 +20,16 @@ if (!fs.existsSync(platformBinDir)) {
20
}
21
22
function copyExe(exe) {
23
+ const ext = process.platform === "win32" ? ".exe" : "";
24
+ const src = path.join(duneBinDir, exe + ext);
25
const dest = path.join(platformBinDir, exe + ".exe");
26
- const ext = process.platform === "win32" ? ".exe" : "";
- fs.copyFileSync(path.join(duneBinDir, exe + ext), dest);
27
+ // For some reason, the copy operation fails in Windows CI if the file already exists.
28
+ if (process.platform === "win32" && fs.existsSync(dest)) {
29
+ fs.rmSync(dest);
30
+ }
31
+
32
+ fs.copyFileSync(src, dest);
33
34
if (process.platform !== "win32") {
35
child_process.execSync(`strip ${dest}`);
0 commit comments