Skip to content

Commit 9cbb65a

Browse files
Match against Apple processor for M1 chips
1 parent 61f88f8 commit 9cbb65a

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 = cpuCore.model.includes("Apple M1")
128+
const isM1 = /Apple M1|processor/i.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()
@@ -168,7 +168,7 @@ async function getLinuxInfo() {
168168
infoArray.forEach((val) => {
169169
infoMap.set(val[0].toLowerCase(), val[1])
170170
});
171-
171+
172172
return infoMap
173173
} catch (error) {
174174
print.error(`Error fetching the Linux version:\n ${error}`)

0 commit comments

Comments
 (0)