1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 12:21:00 +01:00

fix(chruby): update brew sourcing for Apple Silicon

This commit is contained in:
Dennis Dashkevich
2025-01-27 01:26:51 +03:00
parent ce9a4a0196
commit 313bd414a7

View File

@@ -16,14 +16,15 @@ _source-from-omz-settings() {
}
_source-from-homebrew() {
(( $+commands[brew] )) || return 1
local _brew_prefix
# check default brew prefix
if [[ -h /usr/local/opt/chruby ]];then
_brew_prefix="/usr/local/opt/chruby"
if [[ -h /opt/homebrew/opt/chruby ]]; then
_brew_prefix="/opt/homebrew/opt/chruby"
else
# ok , it is not default prefix
# check to see if brew command is available
(( $+commands[brew] )) || return 1
# this call to brew is expensive ( about 400 ms ), so at least let's make it only once
_brew_prefix=$(brew --prefix chruby)
fi