mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew.sh: set HOMEBREW_CELLAR after default prefix
Fixes #14557. This allows correcting the prefix variables first. See #15656. Co-Authored-By: rohanssrao <17805516+rohanssrao@users.noreply.github.com>
This commit is contained in:
parent
4bbc0af693
commit
287a359a74
@ -13,17 +13,6 @@ case "${HOMEBREW_SYSTEM}" in
|
||||
Linux) HOMEBREW_LINUX="1" ;;
|
||||
esac
|
||||
|
||||
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
|
||||
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
|
||||
# These variables are set by bin/brew
|
||||
# shellcheck disable=SC2154
|
||||
if [[ -d "${HOMEBREW_REPOSITORY}/Cellar" ]]
|
||||
then
|
||||
HOMEBREW_CELLAR="${HOMEBREW_REPOSITORY}/Cellar"
|
||||
else
|
||||
HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar"
|
||||
fi
|
||||
|
||||
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX="/opt/homebrew"
|
||||
HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY="${HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}"
|
||||
HOMEBREW_LINUX_DEFAULT_PREFIX="/home/linuxbrew/.linuxbrew"
|
||||
@ -55,6 +44,17 @@ else
|
||||
HOMEBREW_DEFAULT_TEMP="/tmp"
|
||||
fi
|
||||
|
||||
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
|
||||
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
|
||||
# These variables are set by bin/brew
|
||||
# shellcheck disable=SC2154
|
||||
if [[ -d "${HOMEBREW_REPOSITORY}/Cellar" ]]
|
||||
then
|
||||
HOMEBREW_CELLAR="${HOMEBREW_REPOSITORY}/Cellar"
|
||||
else
|
||||
HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar"
|
||||
fi
|
||||
|
||||
HOMEBREW_CACHE="${HOMEBREW_CACHE:-${HOMEBREW_DEFAULT_CACHE}}"
|
||||
HOMEBREW_LOGS="${HOMEBREW_LOGS:-${HOMEBREW_DEFAULT_LOGS}}"
|
||||
HOMEBREW_TEMP="${HOMEBREW_TEMP:-${HOMEBREW_DEFAULT_TEMP}}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user