Skip to content

Commit 965d5fc

Browse files
committed
added additional check for m1 macs
1 parent 2b68614 commit 965d5fc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commands/test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,19 @@ function getPlatform() {
5353
const type = os.type();
5454
const arch = os.arch();
5555
const release = os.release();
56+
const cpuCore = os.cpus()[0];
5657
const majorVersion = release.substr(0, release.indexOf('.'));
5758

58-
if (arch === 'x64') {
59+
if (arch === 'x64' || (arch === 'arm64' && cpuCore.model.includes("M1"))) {
5960
if (type === 'Darwin') {
6061
if (majorVersion === '19') {
6162
return 'binary-macos-10.15';
6263
} else if (majorVersion === '18') {
6364
return 'binary-macos-10.14';
65+
} else if (cpuCore.model.includes("M1")) {
66+
return 'binary-macos-11-m1';
6467
}
65-
return 'binary-macos-11'
68+
return 'binary-macos-11';
6669
} else if (type === 'Linux') {
6770
if (majorVersion === '18') {
6871
return 'binary-linux-18';

0 commit comments

Comments
 (0)