mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Search additional locations for rbenv executable if first check fails.
This commit is contained in:
parent
6402e8b599
commit
c0af189b3c
1 changed files with 9 additions and 3 deletions
|
|
@ -8,9 +8,15 @@ for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do
|
|||
done
|
||||
unset rbenvdir
|
||||
|
||||
# Check for homebrew rbenv (installed directly in /usr/local/bin)
|
||||
if [ -f /usr/local/bin/rbenv -a $FOUND_RBENV -eq 0 ] ; then
|
||||
# If not found above, check the rest of $PATH for an rbenv executable (usually installed
|
||||
# in /usr/local/bin, but may be installed elsewhere)
|
||||
if [ $FOUND_RBENV -eq 0 ] ; then
|
||||
for rbbindir in ${path} ; do
|
||||
if [ -x $rbbindir/rbenv ] ; then
|
||||
FOUND_RBENV=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $FOUND_RBENV -eq 1 ] ; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue