mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(brew): add support for custom BREW_LOCATION
Fixes #11888 Co-authored-by: Matt Cable <github@curiousstranger.org>
This commit is contained in:
parent
01f5512311
commit
7e4c26860d
2 changed files with 17 additions and 10 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue