We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eefb6e8 commit 7175173Copy full SHA for 7175173
npm/postinstall.mjs
@@ -80,9 +80,12 @@ async function downloadBin() {
80
file.pipe(writable);
81
await new Promise((res) => writable.on("close", res));
82
83
- await fs.promises.rm(__bin, { recursive: true, force: true });
+ if (fs.existsSync(__bin)) {
84
+ await fs.promises.rm(__bin, { recursive: true, force: true });
85
+ }
86
+
87
if (fs.existsSync(__bin_unix)) {
88
await fs.promises.rename(__bin_unix, __bin);
89
+ await fs.promises.chmod(__bin, "755");
90
}
- await fs.promises.chmod(__bin, "755");
91
0 commit comments