1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-12 21:33:54 -05:00

Added fallback to system executable

If pyenv doesn't find an executable for the current version/virtualenv,
then search the "system" version as a fallback.
This commit is contained in:
Harish Rajagopal
2021-01-29 13:00:14 +01:00
parent ef3b5072ce
commit cdecf14535

View File

@@ -39,7 +39,7 @@ OLDIFS="$IFS"
IFS=: versions=(${PYENV_VERSION:-$(pyenv-version-name)}) IFS=: versions=(${PYENV_VERSION:-$(pyenv-version-name)})
IFS="$OLDIFS" IFS="$OLDIFS"
for version in "${versions[@]}"; do for version in "${versions[@]}" "system"; do
if [ "$version" = "system" ]; then if [ "$version" = "system" ]; then
PATH="$(remove_from_path "${PYENV_ROOT}/shims")" PATH="$(remove_from_path "${PYENV_ROOT}/shims")"
PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND" || true)" PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND" || true)"