Commit e46986c7 by Sam Stephenson

Default RBENV_VERSION to the globally-specified Ruby

Fixes `rbenv install` in a directory with a .ruby-version file that specifies ree
parent b4fd8e94
...@@ -142,6 +142,12 @@ if [ -z "${RUBY_BUILD_CACHE_PATH}" ] && [ -d "${RBENV_ROOT}/cache" ]; then ...@@ -142,6 +142,12 @@ if [ -z "${RUBY_BUILD_CACHE_PATH}" ] && [ -d "${RBENV_ROOT}/cache" ]; then
export RUBY_BUILD_CACHE_PATH="${RBENV_ROOT}/cache" export RUBY_BUILD_CACHE_PATH="${RBENV_ROOT}/cache"
fi fi
# Default RBENV_VERSION to the globally-specified Ruby version. (The
# REE installer requires an existing Ruby installation to run. An
# unsatisfied local .ruby-version file can cause the installer to
# fail.)
export RBENV_VERSION="$(rbenv global 2>/dev/null || true)"
# Execute `before_install` hooks. # Execute `before_install` hooks.
for hook in "${before_hooks[@]}"; do eval "$hook"; done for hook in "${before_hooks[@]}"; do eval "$hook"; done
......
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