Skip to content

Commit

Permalink
Merge pull request #1439 from net/patch-1
Browse files Browse the repository at this point in the history
fix: allow npm binary upgrades
  • Loading branch information
drager authored Oct 29, 2024
2 parents c5f8e83 + f5c3554 commit f177dd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion npm/binary.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { Binary } = require("binary-install");
const { join } = require("path");
const os = require("os");

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

const install = () => {
Expand Down

0 comments on commit f177dd3

Please sign in to comment.