rbenv: Detect $RBENV_ROOT and act accordingly.

Same fix as with pyenv, if RBENV_ROOT is set, use that.

This also fixes issues for Homebrew users if they followed the caveat to
set RBENV_ROOT to use the homebrew created directories.
This commit is contained in:
Daniele Sluijters 2013-11-03 18:18:10 +01:00
parent e5a2f103ae
commit aa096727ad

View File

@ -1,7 +1,17 @@
if test -d $HOME/.rbenv/bin if test -n "$RBENV_ROOT"
set PATH $HOME/.rbenv/bin $PATH if test -d $RBENV_ROOT/bin
end set PATH $RBENV_ROOT/bin $PATH
end
if test -d $HOME/.rbenv/shims if test -d $RBENV_ROOT/shims
set PATH $HOME/.rbenv/shims $PATH set PATH $RBENV_ROOT/shims $PATH
end
else
if test -d $HOME/.rbenv/bin
set PATH $HOME/.rbenv/bin $PATH
end
if test -d $HOME/.rbenv/shims
set PATH $HOME/.rbenv/shims $PATH
end
end end