From 9a83e52ae479607084c6df198ec21a93d371cb7b Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 8 Jul 2020 12:30:45 -0700 Subject: [PATCH] HOMEBREW_PROCESSOR is arm64 on Apple Silicon Utils::Bottles::tag: ARM tag is arm64_big_sur --- Library/Homebrew/brew.sh | 6 ++---- Library/Homebrew/extend/os/mac/utils/bottles.rb | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index c2f02d4316..64eb881fd9 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -87,6 +87,7 @@ then odie "Cowardly refusing to continue at this prefix: $HOMEBREW_PREFIX" fi +HOMEBREW_PROCESSOR="$(uname -m)" HOMEBREW_SYSTEM="$(uname -s)" case "$HOMEBREW_SYSTEM" in Darwin) HOMEBREW_MACOS="1" ;; @@ -119,11 +120,9 @@ fi if [[ -n "$HOMEBREW_MACOS" ]] then - HOMEBREW_PROCESSOR="$(uname -p)" HOMEBREW_PRODUCT="Homebrew" HOMEBREW_SYSTEM="Macintosh" - # This is i386 even on x86_64 machines - [[ "$HOMEBREW_PROCESSOR" = "i386" ]] && HOMEBREW_PROCESSOR="Intel" + [[ "$HOMEBREW_PROCESSOR" = "x86_64" ]] && HOMEBREW_PROCESSOR="Intel" HOMEBREW_MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)" HOMEBREW_OS_VERSION="macOS $HOMEBREW_MACOS_VERSION" # Don't change this from Mac OS X to match what macOS itself does in Safari on 10.12 @@ -166,7 +165,6 @@ then HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH="1" fi else - HOMEBREW_PROCESSOR="$(uname -m)" HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew" [[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)" : "${HOMEBREW_OS_VERSION:=$(uname -r)}" diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb index 37d34eadb2..4b93867887 100644 --- a/Library/Homebrew/extend/os/mac/utils/bottles.rb +++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb @@ -9,7 +9,7 @@ module Utils if Hardware::CPU.intel? MacOS.version.to_sym else - "#{ENV["HOMEBREW_PROCESSOR"]}_#{MacOS.version.to_sym}".to_sym + "#{Hardware::CPU.arch}_#{MacOS.version.to_sym}".to_sym end end end