From fd1ca7e2b74a6fc0b5a3a8a0eadfcc808325308a Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 11 Nov 2021 16:24:59 +0800 Subject: [PATCH] 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. --- Library/Homebrew/cmd/vendor-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 0a68993b48..43ad0d853d 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -14,8 +14,7 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor" # Built from https://github.com/Homebrew/homebrew-portable-ruby. if [[ -n "${HOMEBREW_MACOS}" ]] then - if [[ "${HOMEBREW_PROCESSOR}" == "Intel" && - "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] || + if [[ "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] || # 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 # use a x86_64 Portable Ruby.