Remove redundant conditionals
Whenever the `sysctl` call does not match `"Apple"*`, we can be sure that `HOMEBREW_PROCESSOR` is `Intel`, so there's no need for this additional check.
This commit is contained in:
parent
51ab1649fb
commit
fd1ca7e2b7
@ -14,8 +14,7 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"
|
|||||||
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
|
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
|
||||||
if [[ -n "${HOMEBREW_MACOS}" ]]
|
if [[ -n "${HOMEBREW_MACOS}" ]]
|
||||||
then
|
then
|
||||||
if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
|
if [[ "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
|
||||||
"$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
|
|
||||||
# Handle the case where /usr/local/bin/brew is run under arm64.
|
# Handle the case where /usr/local/bin/brew is run under arm64.
|
||||||
# It's a x86_64 installation there (we refuse to install arm64 binaries) so
|
# It's a x86_64 installation there (we refuse to install arm64 binaries) so
|
||||||
# use a x86_64 Portable Ruby.
|
# use a x86_64 Portable Ruby.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user