From af4c50c0ad41519c98867f367bba349132eaf37c Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Wed, 23 Sep 2015 16:08:58 +0200 Subject: [PATCH] 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. --- plugins/rbenv/rbenv.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index ef5106f2d..8633c4393 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -10,7 +10,7 @@ if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null) fi 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 if [[ $RBENV_ROOT = '' ]]; then RBENV_ROOT=$rbenvdir