Better check for Rosetta 2
This uses the syctl.proc_translated sysctl, which is the Apple documented way to check for Rosetta 2 environment.
This commit is contained in:
parent
5510ae7ccd
commit
f16163c144
@ -69,7 +69,7 @@ module Hardware
|
||||
# conflict between what `uname` reports and the underlying `sysctl` flags,
|
||||
# since the `sysctl` flags don't change behaviour under Rosetta 2.
|
||||
def in_rosetta2?
|
||||
intel? && physical_cpu_arm64?
|
||||
sysctl_bool("sysctl.proc_translated")
|
||||
end
|
||||
|
||||
def features
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user