Skip to content

Commit f5c3554

Browse files
authored
fix: allow npm binary upgrades
1 parent c5f8e83 commit f5c3554

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

npm/binary.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { Binary } = require("binary-install");
2+
const { join } = require("path");
23
const os = require("os");
34

45
const windows = "x86_64-pc-windows-msvc";
@@ -30,7 +31,9 @@ const getBinary = () => {
3031
const author = "rustwasm";
3132
const name = "wasm-pack";
3233
const url = `https://github.com/${author}/${name}/releases/download/v${version}/${name}-v${version}-${platform}.tar.gz`;
33-
return new Binary(platform === windows ? "wasm-pack.exe" : "wasm-pack", url);
34+
return new Binary(platform === windows ? "wasm-pack.exe" : "wasm-pack", url, {
35+
installDirectory: join(__dirname, "binary")
36+
});
3437
};
3538

3639
const install = () => {

0 commit comments

Comments
 (0)