From 496dab588ea9fea9ea5a36c9ef6bd6ee6574148b Mon Sep 17 00:00:00 2001 From: Avery Harnish Date: Mon, 22 Feb 2021 12:52:32 -0600 Subject: [PATCH] feat: adds support for M1 macbooks to npm installer --- installers/npm/binary.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/installers/npm/binary.js b/installers/npm/binary.js index 52d7483d8..affbad110 100644 --- a/installers/npm/binary.js +++ b/installers/npm/binary.js @@ -30,14 +30,19 @@ const supportedPlatforms = [ RUST_TARGET: "x86_64-apple-darwin", BINARY_NAME: name, }, + { + TYPE: "Darwin", + ARCHITECTURE: "arm64", + RUST_TARGET: "x86_64-apple-darwin", + BINARY_NAME: name, + }, ]; const getPlatform = () => { const type = os.type(); const architecture = os.arch(); - for (let index in supportedPlatforms) { - let supportedPlatform = supportedPlatforms[index]; + for (supportedPlatform of supportedPlatforms) { if ( type === supportedPlatform.TYPE && architecture === supportedPlatform.ARCHITECTURE