未验证 提交 8aeb2878 编辑于 作者:浏览文件
vendor-install: handle native ARM running under Rosetta
Since `HOMEBREW_PROCESSOR` is populated using `uname -m`, this will register as `Intel` even when a native ARM install is running under Rosetta. Let's work around this by checking `sysctl -n machdep.cpu.brand_string`. On my Intel machine: ❯ sysctl -n machdep.cpu.brand_string Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz On Apple Silicon: brew@HMBRW-A-001-M1-001 ~ % sysctl -n machdep.cpu.brand_string Apple M1 The case of a Rosetta installation of Homebrew is already handled below the proposed change. Fixes Homebrew/discussions#2434.