From 6ae2f39cc12d7102ca207e3bd33e986acce3eac8 Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Thu, 25 Apr 2019 15:59:49 +0800 Subject: [PATCH] ruby: support environment variable RBENV_ROOT --- modules/ruby/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index 4ede366..1c1fb99 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -15,8 +15,8 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then source "$HOME/.rvm/scripts/rvm" # Load manually installed rbenv into the shell session. -elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then - path=("$HOME/.rbenv/bin" $path) +elif [[ -s "${RBENV_ROOT:=$HOME/.rbenv}/bin/rbenv" ]]; then + path=("${RBENV_ROOT}/bin" $path) eval "$(rbenv init - --no-rehash zsh)" # Load package manager installed rbenv into the shell session.