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

Merge pull request #850 from jasonkarns/remove-legacy-global-version-file

Remove support for legacy global version files
This commit is contained in:
Mislav Marohnić
2015-12-29 14:40:37 +01:00
4 changed files with 9 additions and 34 deletions

View File

@@ -27,8 +27,5 @@ RBENV_VERSION_FILE="${RBENV_ROOT}/version"
if [ -n "$RBENV_VERSION" ]; then
rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION"
else
rbenv-version-file-read "$RBENV_VERSION_FILE" ||
rbenv-version-file-read "${RBENV_ROOT}/global" ||
rbenv-version-file-read "${RBENV_ROOT}/default" ||
echo system
rbenv-version-file-read "$RBENV_VERSION_FILE" || echo system
fi

View File

@@ -22,15 +22,7 @@ find_local_version_file() {
find_global_version_file() {
local 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
echo "$global_version_file"
}
if [ -n "$target_dir" ]; then