Trying to understand if brew shellenv
is doing the right thing with zsh site-functions
#5683
-
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
The output of Can you try applying this patch to diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh
index 498510ac44..d729c75be6 100644
--- a/Library/Homebrew/cmd/shellenv.sh
+++ b/Library/Homebrew/cmd/shellenv.sh
@@ -17,6 +17,7 @@ homebrew-shellenv() {
else
HOMEBREW_SHELL_NAME="$(/bin/ps -p "${PPID}" -c -o comm=)"
fi
+ echo "HOMEBREW_SHELL_NAME=${HOMEBREW_SHELL_NAME}"
if [[ -n "${HOMEBREW_MACOS}" ]] &&
[[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -ge "140000" ]] && and then tell me the output of You can do git -C "$(brew --repository)" restore Library/Homebrew/cmd/shellenv.sh after to undo the changes. |
Beta Was this translation helpful? Give feedback.
-
Your frustration may be from the slight non-synchronisation between documentation and implementation, as pointed out by Homebrew/brew#18579. While the " This is an acknowledged issue, and since you're following the stable releases, one option for you would be to wait until the next stable release (which, following Homebrew's typical release cycle, should take place early next week). Alternatively, you can get the latest updates (though not officially considered stable yet) by first switching on the developer mode with |
Beta Was this translation helpful? Give feedback.
-
Both @carlocab and @ZhongRuoyu are correct, and helped me solve my problem! (I can only mark one answer as "the answer" so I just picked the first response which was Carlo's.) Thank you both! |
Beta Was this translation helpful? Give feedback.
The output of
/bin/ps -p $PPID -c -o comm=
when run directly in your terminal is not the same as whatbrew shellenv
sees (your terminal andbrew shellenv
have different parent processes).Can you try applying this patch to
$(brew --repository)/Library/Homebrew/cmd/shellenv.sh