fix(brew): add sbin to PATH (#13780)

This commit is contained in:
Ininsico authored and GitHub committed 2026-06-01 10:55:38 +02:00
1 parent cfdc4822d4
commit b86a99da17
2 files changed
+16

No files matched your search

+10
View File
@@ -30,6 +30,16 @@ if [[ -z "$HOMEBREW_PREFIX" ]]; then
export HOMEBREW_PREFIX="$(brew --prefix)"
fi
# Add Homebrew sbin to PATH if it exists and is not already in PATH.
# Homebrew's shellenv only adds bin directories, not sbin. Some formulae
# (e.g. mtr) install executables to sbin, and brew doctor warns if it's
# missing from PATH.
if [[ -d "$HOMEBREW_PREFIX/sbin" ]]; then
if [[ ! "$PATH" == *"$HOMEBREW_PREFIX/sbin"* ]]; then
export PATH="$HOMEBREW_PREFIX/sbin:$PATH"
fi
fi
if [[ -d "$HOMEBREW_PREFIX/share/zsh/site-functions" ]]; then
fpath+=("$HOMEBREW_PREFIX/share/zsh/site-functions")
fi