Skip to content

Commit ba4b115

Browse files
Move arch check to the isM1 declaration
1 parent 0ebac13 commit ba4b115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function getPlatform(logsOpt) {
125125
const type = os.type()
126126
const arch = os.arch()
127127
const cpuCore = os.cpus()[0]
128-
const isM1 = /Apple (M1|processor)/.test(cpuCore.model)
128+
const isM1 = (arch === 'arm64' && /Apple (M1|processor)/.test(cpuCore.model))
129129
const linuxInfo = type === 'Linux' ? await getLinuxInfo() : new Map()
130130
const linuxDistro = linuxInfo.get('name')
131131
const release = linuxInfo.get('version') || os.release()
@@ -135,7 +135,7 @@ async function getPlatform(logsOpt) {
135135
print.info(`OS type: ${linuxDistro || type}\nOS arch: ${arch}\nOS release: ${release}\nOS major version: ${majorVersion}\nCPU model: ${cpuCore.model}`)
136136
}
137137

138-
if (arch === 'x64' || (arch === 'arm64' && isM1)) {
138+
if (arch === 'x64' || isM1) {
139139
if (type === 'Darwin') {
140140
if (majorVersion === 19) {
141141
return 'binary-macos-10.15'

0 commit comments

Comments
 (0)