Skip to content

Commit

Permalink
feat(build): adds support for M1 macbooks to npm installer (#300)
Browse files Browse the repository at this point in the history
Co-authored-by: Irina Shestak <[email protected]>
  • Loading branch information
EverlastingBugstopper and lrlna authored Feb 23, 2021
1 parent a3905d3 commit 7f3fc65
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions installers/npm/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f3fc65

Please sign in to comment.