mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
add apple silicon brew
This commit is contained in:
parent
313bd414a7
commit
67550dd12f
1 changed files with 5 additions and 4 deletions
|
|
@ -16,15 +16,16 @@ _source-from-omz-settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_source-from-homebrew() {
|
_source-from-homebrew() {
|
||||||
|
(( $+commands[brew] )) || return 1
|
||||||
|
|
||||||
local _brew_prefix
|
local _brew_prefix
|
||||||
# check default brew prefix
|
# check default brew prefix
|
||||||
if [[ -h /opt/homebrew/opt/chruby ]]; then
|
if [[ -h /usr/local/opt/chruby ]];then
|
||||||
|
_brew_prefix="/usr/local/opt/chruby"
|
||||||
|
elif [[ -h /opt/homebrew/opt/chruby ]]; then
|
||||||
_brew_prefix="/opt/homebrew/opt/chruby"
|
_brew_prefix="/opt/homebrew/opt/chruby"
|
||||||
else
|
else
|
||||||
# ok , it is not default prefix
|
# 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
|
# this call to brew is expensive ( about 400 ms ), so at least let's make it only once
|
||||||
_brew_prefix=$(brew --prefix chruby)
|
_brew_prefix=$(brew --prefix chruby)
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue