bin/brew: never use HOMEBREW_PATH from users.
Fixes https://github.com/Homebrew/brew/issues/13548
This commit is contained in:
parent
e7c3782d03
commit
f4103e5d61
7
bin/brew
7
bin/brew
@ -75,7 +75,7 @@ HOMEBREW_LIBRARY="${HOMEBREW_REPOSITORY}/Library"
|
|||||||
|
|
||||||
# Copy and export all HOMEBREW_* variables previously mentioned in
|
# Copy and export all HOMEBREW_* variables previously mentioned in
|
||||||
# manpage or used elsewhere by Homebrew.
|
# manpage or used elsewhere by Homebrew.
|
||||||
for VAR in BAT_THEME BROWSER DISPLAY EDITOR NO_COLOR PATH TMUX DBUS_SESSION_BUS_ADDRESS
|
for VAR in BAT_THEME BROWSER DISPLAY EDITOR NO_COLOR TMUX DBUS_SESSION_BUS_ADDRESS
|
||||||
do
|
do
|
||||||
# Skip if variable value is empty.
|
# Skip if variable value is empty.
|
||||||
[[ -z "${!VAR}" ]] && continue
|
[[ -z "${!VAR}" ]] && continue
|
||||||
@ -109,6 +109,11 @@ then
|
|||||||
export CI="1"
|
export CI="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# save the existing user path as HOMEBREW_PATH so it can be queried by
|
||||||
|
# e.g. brew doctor later.
|
||||||
|
HOMEBREW_PATH="${PATH}"
|
||||||
|
export HOMEBREW_PATH
|
||||||
|
|
||||||
# set from user environment
|
# set from user environment
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ -z "${HOMEBREW_NO_ENV_FILTERING}" ]]
|
if [[ -z "${HOMEBREW_NO_ENV_FILTERING}" ]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user