Skip to content

Commit

Permalink
Test commit
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmesamster committed Jul 21, 2024
1 parent c9d01e7 commit b976b91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/holder/src/env/os/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export enum Platform {
}

export function getPlatform(win32Only = false): Platform {
const { execSync } = require('child_process');
const result = execSync('sysctl -n machdep.cpu.brand_string').toString();
switch (os.platform()) {
case Platform.aix:
case Platform.freebsd:
Expand All @@ -29,7 +31,7 @@ export function getPlatform(win32Only = false): Platform {
case Platform.openbsd:
return Platform.linux;
case Platform.darwin:
if (os.arch() === 'arm64') {
if (os.arch() === 'arm64' || !result.includes("Intel")) {
return Platform.darwinaarch64;
} else {
return Platform.darwin;
Expand Down

0 comments on commit b976b91

Please sign in to comment.