mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
libexec/rbenv-version{,-origin}: fix earlier commit to allow for RBENV_VERSION env var
This commit is contained in:
parent
dd86f543fc
commit
5c3268c9af
2 changed files with 8 additions and 5 deletions
|
@ -8,9 +8,9 @@
|
|||
set -e
|
||||
[ -n "$RBENV_DEBUG" ] && set -x
|
||||
|
||||
RBENV_VERSION_FILE="$(rbenv-version-origin)"
|
||||
if [ -e "$RBENV_VERSION_FILE" ]; then
|
||||
echo "$(rbenv-version-name) (set by $RBENV_VERSION_FILE)"
|
||||
else
|
||||
RBENV_VERSION_ORIGIN="$(rbenv-version-origin)"
|
||||
if [ -z "$RBENV_VERSION_ORIGIN" ]; then
|
||||
echo "$(rbenv-version-name)"
|
||||
else
|
||||
echo "$(rbenv-version-name) (set by $RBENV_VERSION_ORIGIN)"
|
||||
fi
|
||||
|
|
|
@ -17,5 +17,8 @@ if [ -n "$RBENV_VERSION_ORIGIN" ]; then
|
|||
elif [ -n "$RBENV_VERSION" ]; then
|
||||
echo "RBENV_VERSION environment variable"
|
||||
else
|
||||
rbenv-version-file
|
||||
RBENV_VERSION_FILE="$(rbenv-version-file)"
|
||||
if [ -e "$RBENV_VERSION_FILE" ]; then
|
||||
echo $RBENV_VERSION_FILE
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue