Respect RBENV_ROOT and PYENV_ROOT if set

This commit is contained in:
Evan Sosenko 2018-02-21 10:43:25 -08:00
commit 345600d436
No known key found for this signature in database
GPG key ID: 757C899CECF66FE0
2 changed files with 8 additions and 0 deletions

View file

@ -12,6 +12,10 @@ if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null)
fi
fi
if [[ -n "$RBENV_ROOT" ]]; then
rbenvdirs=($RBENV_ROOT "${rbenvdirs[@]}")
fi
for rbenvdir in "${rbenvdirs[@]}" ; do
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
FOUND_RBENV=1