1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 15:23:53 -05:00

Add support for RBENV_VERSION=system

This commit is contained in:
Sam Stephenson
2011-08-03 08:39:56 -05:00
parent 4668a2e2ed
commit e0e2d93639
3 changed files with 39 additions and 1 deletions

View File

@@ -6,6 +6,12 @@ elif [ -z "$RBENV_VERSION" ]; then
RBENV_VERSION="$(rbenv-version)"
fi
if [ "$RBENV_VERSION" = "system" ]; then
RUBY_PATH="$(rbenv-which ruby)"
echo "${RUBY_PATH%/*}"
exit
fi
RBENV_PREFIX_PATH="${HOME}/.rbenv/versions/${RBENV_VERSION}"
if [ ! -d "$RBENV_PREFIX_PATH" ]; then
echo "rbenv: version \`${RBENV_VERSION}' not installed" >&2