From 6030ea51e4e4bdefa188529ed7bca8e45b1b078e Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Mon, 1 Aug 2016 00:32:50 +0000 Subject: [PATCH] Add a workaround for system executables in `/bin` --- libexec/rbenv-prefix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rbenv-prefix b/libexec/rbenv-prefix index 5376cf5d..e65be834 100755 --- a/libexec/rbenv-prefix +++ b/libexec/rbenv-prefix @@ -24,7 +24,8 @@ fi if [ "$RBENV_VERSION" = "system" ]; then if RUBY_PATH="$(rbenv-which ruby 2>/dev/null)"; then RUBY_PATH="${RUBY_PATH%/*}" - echo "${RUBY_PATH%/bin}" + RBENV_PREFIX_PATH="${RUBY_PATH%/bin}" + echo "${RBENV_PREFIX_PATH:-/}" exit else echo "rbenv: system version not found in PATH" >&2