mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
reduce rbenv plugin load time by 150ms by removing additional brew call
This commit is contained in:
parent
a207a38d63
commit
daedfcab51
1 changed files with 3 additions and 6 deletions
|
@ -2,14 +2,11 @@ _homebrew-installed() {
|
||||||
type brew &> /dev/null
|
type brew &> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
_rbenv-from-homebrew-installed() {
|
|
||||||
brew --prefix rbenv &> /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
FOUND_RBENV=0
|
FOUND_RBENV=0
|
||||||
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
|
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
|
||||||
if _homebrew-installed && _rbenv-from-homebrew-installed ; then
|
if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null); then
|
||||||
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
|
rbenvdirs=($rbenv_homebrew_path "${rbenvdirs[@]}")
|
||||||
|
unset rbenv_homebrew_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for rbenvdir in "${rbenvdirs[@]}" ; do
|
for rbenvdir in "${rbenvdirs[@]}" ; do
|
||||||
|
|
Loading…
Reference in a new issue