1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 20:43:48 -05:00

Auto-resolve prefixes to the latest version (#2487)

This commit is contained in:
native-api
2022-10-30 03:38:40 +03:00
committed by GitHub
parent 0b5e16add3
commit a12f947cc3
13 changed files with 258 additions and 13 deletions

View File

@@ -145,6 +145,10 @@ IFS=$'\n' scripts=(`pyenv-hooks install`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done
# Try to resolve a prefix if user indeed gave a prefix.
# We install the version under the resolved name
# and hooks also see the resolved name
DEFINITION="$(pyenv-latest -q -k "$DEFINITION" || echo "$DEFINITION")"
# Set VERSION_NAME from $DEFINITION, if it is not already set. Then
# compute the installation prefix.