mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Set proper PYENV_VERSION
during pyenv install
This commit is contained in:
parent
73d5ea7426
commit
589872affb
1 changed files with 7 additions and 1 deletions
|
@ -161,7 +161,13 @@ fi
|
||||||
# unsatisfied local python version can cause the installer to
|
# unsatisfied local python version can cause the installer to
|
||||||
# fail.)
|
# fail.)
|
||||||
if [[ "${VERSION_NAME}" == [23]"."* ]]; then
|
if [[ "${VERSION_NAME}" == [23]"."* ]]; then
|
||||||
export PYENV_VERSION="$(pyenv-whence "python${VERSION_NAME%%.${VERSION_NAME##*.}}" 2>/dev/null | tail -1 || true)"
|
for version in "${VERSION_NAME%-dev}" "${VERSION_NAME%.*}" "${VERSION_NAME%%.*}"; do
|
||||||
|
PYENV_VERSION="$(pyenv-whence "python${version}" 2>/dev/null | tail -n 1 || true)"
|
||||||
|
if [ -n "${PYENV_VERSION}" ]; then
|
||||||
|
export PYENV_VERSION
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue