mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
feat: add Rosetta detection for Apple Silicon (#5717)
* feat: add Rosetta detection for Apple Silicon * fix: update class attributes to className for React compatibility
This commit is contained in:
committed by
GitHub
parent
8d2f087206
commit
85319769a5
18
packages/bruno-electron/src/utils/arch.js
Normal file
18
packages/bruno-electron/src/utils/arch.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const getIsRunningInRosetta = () => {
|
||||
const isMac = process.platform === 'darwin';
|
||||
const isArm64 = process.arch === 'arm64';
|
||||
|
||||
if (!isMac) return false;
|
||||
if (isArm64) return false;
|
||||
|
||||
const os = require('os');
|
||||
const isRunningOnSilicon = os.cpus().find((d) => d.model.includes('Apple'));
|
||||
if (!isRunningOnSilicon) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getIsRunningInRosetta
|
||||
};
|
||||
Reference in New Issue
Block a user