Skip to content

Commit e593c9f

Browse files
committed
future-proof Mx cpu detection
1 parent ec5d646 commit e593c9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cli/src/commands/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ async function getPlatform(
202202
const type = os.type();
203203
const arch = os.arch();
204204
const cpuCore = os.cpus()[0];
205-
const isAppleSilicon = arch === 'arm64' && /Apple (M1|M2|M3|M4|processor)/.test(cpuCore.model);
205+
const isAppleSilicon = arch === 'arm64' && /Apple (M[0-9]|processor)/.test(cpuCore.model);
206206
const linuxInfo = type === 'Linux' ? await getLinuxInfo.bind(this)() : {};
207207
const linuxDistro = linuxInfo.name;
208208
const release = linuxInfo.version || os.release();

0 commit comments

Comments
 (0)