1
0
Fork 0
mirror of https://github.com/pyenv/pyenv.git synced 2025-01-04 23:51:01 +00:00

Simplify fallback to global version file

This commit is contained in:
Mislav Marohnić 2015-12-29 14:44:32 +01:00
parent e199a3d8f7
commit a95ccd09a2

View file

@ -19,16 +19,10 @@ find_local_version_file() {
return 1
}
find_global_version_file() {
local global_version_file="${RBENV_ROOT}/version"
echo "$global_version_file"
}
if [ -n "$target_dir" ]; then
find_local_version_file "$target_dir"
else
find_local_version_file "$RBENV_DIR" || {
[ "$RBENV_DIR" != "$PWD" ] && find_local_version_file "$PWD"
} || find_global_version_file
} || echo "${RBENV_ROOT}/version"
fi