From 9d60472090d8c240997f6963e437f763c94f0bba Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:12:36 +0800 Subject: [PATCH] shellenv: retain user `PATH` This is filtered in `brew`, so we need to manually set this to `HOMEBREW_PATH`. --- Library/Homebrew/cmd/shellenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index 21cab35a26..bd4f915b73 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -50,7 +50,7 @@ homebrew-shellenv() { echo "setenv HOMEBREW_REPOSITORY ${HOMEBREW_REPOSITORY};" if [[ -n "${PATH_HELPER_ROOT}" ]] then - PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" /usr/libexec/path_helper -c + PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" PATH="${HOMEBREW_PATH}" /usr/libexec/path_helper -c else echo "setenv PATH ${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:\$PATH;" fi @@ -71,7 +71,7 @@ homebrew-shellenv() { echo "export HOMEBREW_REPOSITORY=\"${HOMEBREW_REPOSITORY}\";" if [[ -n "${PATH_HELPER_ROOT}" ]] then - PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" /usr/libexec/path_helper -s + PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" PATH="${HOMEBREW_PATH}" /usr/libexec/path_helper -s else echo "export PATH=\"${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin\${PATH+:\$PATH}\";" fi