Skip to content

Commit

Permalink
HOMEBREW_PROCESSOR is arm64 on Apple Silicon
Browse files Browse the repository at this point in the history
Utils::Bottles::tag: ARM tag is arm64_big_sur
  • Loading branch information
sjackman committed Jul 10, 2020
1 parent e18027a commit 9a83e52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)}"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/mac/utils/bottles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def tag
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
Expand Down

0 comments on commit 9a83e52

Please sign in to comment.