From cdecf1453555b22d22a8f88a9bcce71244855042 Mon Sep 17 00:00:00 2001 From: Harish Rajagopal Date: Fri, 29 Jan 2021 13:00:14 +0100 Subject: [PATCH] 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. --- libexec/pyenv-which | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-which b/libexec/pyenv-which index 22793472..a7a1264a 100755 --- a/libexec/pyenv-which +++ b/libexec/pyenv-which @@ -39,7 +39,7 @@ OLDIFS="$IFS" IFS=: versions=(${PYENV_VERSION:-$(pyenv-version-name)}) IFS="$OLDIFS" -for version in "${versions[@]}"; do +for version in "${versions[@]}" "system"; do if [ "$version" = "system" ]; then PATH="$(remove_from_path "${PYENV_ROOT}/shims")" PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND" || true)"