Skip to content

Commit f3ca663

Browse files
authored
Merge pull request #1815 from lizardruss/fix-npm-yarn-install
fix: use the given binary path when finishing the install with npm/yarn
2 parents 49a16a2 + a0a6ec4 commit f3ca663

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dist/npm/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const ARCH_MAPPING = {
1414
x64: "amd64",
1515
x86_64: "amd64",
1616
arm: "arm",
17+
arm64: "arm64",
1718
aarch64: "arm"
1819
};
1920
const PLATFORM_MAPPING = {
@@ -223,6 +224,13 @@ let continueProcess = function(askRemoveGlobalFolder) {
223224
} catch(e) {}
224225

225226
let binaryPath = path.join(globalDir, binaryName);
227+
if (process.argv.length > 3 && fs.existsSync(normalizePath(process.argv[3]))) {
228+
let binaryDir = normalizePath(process.argv[3]);
229+
let possibleBinaryPath = path.join(binaryDir, binaryName)
230+
if (fs.existsSync(possibleBinaryPath)) {
231+
binaryPath = possibleBinaryPath;
232+
}
233+
}
226234

227235
try {
228236
fs.unlinkSync(binaryPath + downloadExtension);

0 commit comments

Comments
 (0)