Skip to content

Commit c09e600

Browse files
committed
changed the if conditions a bit
1 parent 965d5fc commit c09e600

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/commands/test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ function getPlatform() {
5555
const release = os.release();
5656
const cpuCore = os.cpus()[0];
5757
const majorVersion = release.substr(0, release.indexOf('.'));
58+
const isM1 = cpuCore.model.includes("Apple M1");
5859

59-
if (arch === 'x64' || (arch === 'arm64' && cpuCore.model.includes("M1"))) {
60+
if (arch === 'x64' || (arch === 'arm64' && isM1)) {
6061
if (type === 'Darwin') {
6162
if (majorVersion === '19') {
6263
return 'binary-macos-10.15';
6364
} else if (majorVersion === '18') {
6465
return 'binary-macos-10.14';
65-
} else if (cpuCore.model.includes("M1")) {
66+
} else if (isM1) {
6667
return 'binary-macos-11-m1';
6768
}
6869
return 'binary-macos-11';

0 commit comments

Comments
 (0)