mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-29 02:12:49 -05:00
0a4ffcd15f
This is the last time it'll change. Promise.
24 lines
516 B
Bash
Executable file
24 lines
516 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
[ -n "$RBENV_DEBUG" ] && set -x
|
|
|
|
root="$RBENV_DIR"
|
|
while [ -n "$root" ]; do
|
|
if [ -e "${root}/.rbenv-version" ]; then
|
|
echo "${root}/.rbenv-version"
|
|
exit
|
|
fi
|
|
root="${root%/*}"
|
|
done
|
|
|
|
global_version_file="${RBENV_ROOT}/version"
|
|
|
|
if [ -e "$global_version_file" ]; then
|
|
echo "$global_version_file"
|
|
elif [ -e "${RBENV_ROOT}/global" ]; then
|
|
echo "${RBENV_ROOT}/global"
|
|
elif [ -e "${RBENV_ROOT}/default" ]; then
|
|
echo "${RBENV_ROOT}/default"
|
|
else
|
|
echo "$global_version_file"
|
|
fi
|