Fix incorrect PATH setting with system-wide rbenv
When using system-wide rbenv (as in provided by vendor packages like in Ubuntu or FreeBSD), PATH is not set to the correct ruby binary. This leads to being unable to use rubies installed with rbenv (and stick with the system-wide ruby installed, if any). This patch correct this behaviour, setting the correct PATH.
This commit is contained in:
parent
76a26a2a59
commit
af4c50c0ad
@ -10,7 +10,7 @@ if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for rbenvdir in "${rbenvdirs[@]}" ; do
|
for rbenvdir in "${rbenvdirs[@]}" ; do
|
||||||
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
|
if [ -d $rbenvdir -a $FOUND_RBENV -eq 0 ] ; then
|
||||||
FOUND_RBENV=1
|
FOUND_RBENV=1
|
||||||
if [[ $RBENV_ROOT = '' ]]; then
|
if [[ $RBENV_ROOT = '' ]]; then
|
||||||
RBENV_ROOT=$rbenvdir
|
RBENV_ROOT=$rbenvdir
|
||||||
|
Loading…
Reference in New Issue
Block a user