0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

fix(azure): recognize properly linuxbrew

Closes #11644
This commit is contained in:
Carlo Sala 2023-04-27 09:57:44 +02:00
parent 343c78ae91
commit 65699912be

View file

@ -31,11 +31,9 @@ function _az-homebrew-installed() {
# check if Homebrew is installed
(( $+commands[brew] )) || return 1
# speculatively check default brew prefix
if [[ -d /usr/local ]]; then
_brew_prefix=/usr/local
elif [[ -d /opt/homebrew ]]; then
_brew_prefix=/opt/homebrew
# if so, we assume it's default way to install brew
if [[ ${commands[brew]:t2} == bin/brew ]]; then
_brew_prefix="${commands[brew]:h:h}" # remove trailing /bin/brew
else
# 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