Commit e9a9deac authored by Tima Maslyuchenko's avatar Tima Maslyuchenko
Browse files

rbenv plugin now uses 'brew --prefix rbenv' command to find rbenv folder

parent e8d582ab
function is_homebrew_installed() {
type brew &> /dev/null
}
function is_rbenv_installed() {
brew --prefix rbenv &> /dev/null
}
FOUND_RBENV=0
for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
if is_homebrew_installed && is_rbenv_installed ; then
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
fi
for rbenvdir in "${rbenvdirs[@]}" ; do
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
FOUND_RBENV=1
export RBENV_ROOT=$rbenvdir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment