mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
parent
343c78ae91
commit
65699912be
1 changed files with 3 additions and 5 deletions
|
@ -31,11 +31,9 @@ function _az-homebrew-installed() {
|
||||||
# check if Homebrew is installed
|
# check if Homebrew is installed
|
||||||
(( $+commands[brew] )) || return 1
|
(( $+commands[brew] )) || return 1
|
||||||
|
|
||||||
# speculatively check default brew prefix
|
# if so, we assume it's default way to install brew
|
||||||
if [[ -d /usr/local ]]; then
|
if [[ ${commands[brew]:t2} == bin/brew ]]; then
|
||||||
_brew_prefix=/usr/local
|
_brew_prefix="${commands[brew]:h:h}" # remove trailing /bin/brew
|
||||||
elif [[ -d /opt/homebrew ]]; then
|
|
||||||
_brew_prefix=/opt/homebrew
|
|
||||||
else
|
else
|
||||||
# ok, it is not in the default prefix
|
# ok, it is not in the default prefix
|
||||||
# this call to brew is expensive (about 400 ms), so at least let's make it only once
|
# this call to brew is expensive (about 400 ms), so at least let's make it only once
|
||||||
|
|
Loading…
Reference in a new issue