baf2ab1bf1096b954a759739cc41c587fb0cf5b2

Author
Nicolas Cavigneaux <nicolas@synbioz.com>
Committer
Nicolas Cavigneaux <nicolas@synbioz.com>
Date

Message

Don't set RBENV_ROOT to "$HOME/.rbenv" when using Homebrew rbenv

Hard setting RBENV_ROOT to "$HOME/.rbenv" when using Homebrew's rbenv
will breaks it. It has to be set to $(brew --prefix rbenv).

Diff

 1diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
 2index 57ae2ca1fad7a1e76fad8aa4c598d25bfad0869b..b6795b91c59b94392060b23fe3664a6170632c16 100644
 3--- a/plugins/rbenv/rbenv.plugin.zsh
 4+++ b/plugins/rbenv/rbenv.plugin.zsh
 5@@ -10,9 +10,6 @@ FOUND_RBENV=0
 6 rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
 7 if _homebrew-installed && _rbenv-from-homebrew-installed ; then
 8     rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
 9-    if [[ $RBENV_ROOT = '' ]]; then 
10-      RBENV_ROOT="$HOME/.rbenv"
11-    fi
12 fi
13 
14 for rbenvdir in "${rbenvdirs[@]}" ; do