From e49be969aba1aec998ab3da38e9a09a2cf881b9e Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Sat, 1 Oct 2011 12:15:20 -0500 Subject: [PATCH] Ensure RBENV_DIR is always an absolute path Otherwise, `RBENV_DIR=bin rbenv version-file` loops indefinitely --- libexec/rbenv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rbenv b/libexec/rbenv index 71924c99..15c02e0a 100755 --- a/libexec/rbenv +++ b/libexec/rbenv @@ -29,6 +29,8 @@ export RBENV_ROOT if [ -z "${RBENV_DIR}" ]; then RBENV_DIR="$(pwd)" +else + RBENV_DIR="$(abs_dirname "$RBENV_DIR")" fi export RBENV_DIR