diff --git a/tools/npm/package.json b/tools/npm/package.json index 7412b42c..3fb444dc 100644 --- a/tools/npm/package.json +++ b/tools/npm/package.json @@ -5,7 +5,7 @@ "license": "MIT", "private": false, "dependencies": { - "binary-install": "^0.1.1", + "@cloudflare/binary-install": "0.2.0", "actions-toolkit": "^2.2.0", "yargs": "^15.3.1" }, diff --git a/tools/npm/utils/binary.js b/tools/npm/utils/binary.js index 41b9c29c..fdf5080c 100755 --- a/tools/npm/utils/binary.js +++ b/tools/npm/utils/binary.js @@ -1,4 +1,4 @@ -const { Binary } = require("binary-install"); +const { Binary } = require("@cloudflare/binary-install"); const os = require("os"); function getPlatform() { @@ -15,7 +15,8 @@ function getPlatform() { function getBinary() { const platform_arch = getPlatform(); const version = require("../package.json").version; - const url = `https://github.com/zeropsio/zcli/releases/download/v${version}/zcli-${platform_arch}-npm.tar.gz`; + const compatibleVersion = version.startsWith('v') ? version : `v${version}`; + const url = `https://github.com/zeropsio/zcli/releases/download/${compatibleVersion}/zcli-${platform_arch}-npm.tar.gz`; const name = `zcli-${platform_arch}`; return new Binary(url, { name }); }