diff options
Diffstat (limited to 'plugins/brew/brew.plugin.zsh')
-rw-r--r-- | plugins/brew/brew.plugin.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index b52664a39..447036376 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,5 +1,10 @@ if (( ! $+commands[brew] )); then - if [[ -x /opt/homebrew/bin/brew ]]; then + if [[ -n "$BREW_LOCATION" ]]; then + if [[ ! -x "$BREW_LOCATION" ]]; then + echo "[oh-my-zsh] $BREW_LOCATION is not executable" + return + fi + elif [[ -x /opt/homebrew/bin/brew ]]; then BREW_LOCATION="/opt/homebrew/bin/brew" elif [[ -x /usr/local/bin/brew ]]; then BREW_LOCATION="/usr/local/bin/brew" |