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.
pull/2/head
Daniele Sluijters 11 years ago
parent e5a2f103ae
commit aa096727ad

@ -1,7 +1,17 @@
if test -d $HOME/.rbenv/bin
set PATH $HOME/.rbenv/bin $PATH
end
if test -n "$RBENV_ROOT"
if test -d $RBENV_ROOT/bin
set PATH $RBENV_ROOT/bin $PATH
end
if test -d $RBENV_ROOT/shims
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
if test -d $HOME/.rbenv/shims
set PATH $HOME/.rbenv/shims $PATH
end
end

Loading…
Cancel
Save