mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 14:35:03 +00:00
* feat: add Rosetta detection for Apple Silicon * fix: update class attributes to className for React compatibility
19 lines
411 B
JavaScript
19 lines
411 B
JavaScript
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
|
|
};
|