brew.sh: remove HOMEBREW_CHANGE_ARCH_TO_ARM
We used to need this because the GitHub runner process was running under Rosetta. GitHub Actions has supported native M1 runners for a few months now, so I think it's time to remove this.
This commit is contained in:
parent
4abca3fa1f
commit
cf01a7f985
1
.github/workflows/doctor.yml
vendored
1
.github/workflows/doctor.yml
vendored
@ -13,7 +13,6 @@ permissions:
|
|||||||
env:
|
env:
|
||||||
HOMEBREW_DEVELOPER: 1
|
HOMEBREW_DEVELOPER: 1
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@ -13,26 +13,6 @@ case "${HOMEBREW_SYSTEM}" in
|
|||||||
Linux) HOMEBREW_LINUX="1" ;;
|
Linux) HOMEBREW_LINUX="1" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "${HOMEBREW_MACOS}" == "1" ]] &&
|
|
||||||
[[ "$(sysctl -n hw.optional.arm64 2>/dev/null)" == "1" ]]
|
|
||||||
then
|
|
||||||
# used in vendor-install.sh
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
HOMEBREW_PHYSICAL_PROCESSOR="arm64"
|
|
||||||
HOMEBREW_ROSETTA="$(sysctl -n sysctl.proc_translated)"
|
|
||||||
|
|
||||||
# If we're running under macOS Rosetta 2, and it was requested by setting
|
|
||||||
# HOMEBREW_CHANGE_ARCH_TO_ARM (for example in CI), then we re-exec this
|
|
||||||
# same file under the native architecture
|
|
||||||
# These variables are set from the user environment.
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
if [[ "${HOMEBREW_CHANGE_ARCH_TO_ARM}" == "1" ]] &&
|
|
||||||
[[ "${HOMEBREW_ROSETTA}" == "1" ]]
|
|
||||||
then
|
|
||||||
exec arch -arm64e "${HOMEBREW_BREW_FILE}" "$@"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
|
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
|
||||||
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
|
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
|
||||||
# These variables are set by bin/brew
|
# These variables are set by bin/brew
|
||||||
@ -442,6 +422,13 @@ then
|
|||||||
# Don't change this from Mac OS X to match what macOS itself does in Safari on 10.12
|
# Don't change this from Mac OS X to match what macOS itself does in Safari on 10.12
|
||||||
HOMEBREW_OS_USER_AGENT_VERSION="Mac OS X ${HOMEBREW_MACOS_VERSION}"
|
HOMEBREW_OS_USER_AGENT_VERSION="Mac OS X ${HOMEBREW_MACOS_VERSION}"
|
||||||
|
|
||||||
|
if [[ "$(sysctl -n hw.optional.arm64 2>/dev/null)" == "1" ]]
|
||||||
|
then
|
||||||
|
# used in vendor-install.sh
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
HOMEBREW_PHYSICAL_PROCESSOR="arm64"
|
||||||
|
fi
|
||||||
|
|
||||||
# Intentionally set this variable by exploding another.
|
# Intentionally set this variable by exploding another.
|
||||||
# shellcheck disable=SC2086,SC2183
|
# shellcheck disable=SC2086,SC2183
|
||||||
printf -v HOMEBREW_MACOS_VERSION_NUMERIC "%02d%02d%02d" ${HOMEBREW_MACOS_VERSION//./ }
|
printf -v HOMEBREW_MACOS_VERSION_NUMERIC "%02d%02d%02d" ${HOMEBREW_MACOS_VERSION//./ }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user