Fix not printing asterisk for current version in Bash 3

This commit is contained in:
Ivan Pozdeev 2021-02-14 15:50:36 +03:00
parent a0b02db770
commit 00f7d6249a

View file

@ -106,7 +106,7 @@ exists() {
print_version() { print_version() {
if [[ ${BASH_VERSINFO[0]} -ge 4 && ${current_versions["$1"]} ]]; then if [[ ${BASH_VERSINFO[0]} -ge 4 && ${current_versions["$1"]} ]]; then
echo "${hit_prefix}$1 (set by $(pyenv-version-origin))" echo "${hit_prefix}$1 (set by $(pyenv-version-origin))"
elif (( ${BASH_VERSINFO[0]} < 3 )) && exists "$1" "${current_versions[@]}"; then elif (( ${BASH_VERSINFO[0]} <= 3 )) && exists "$1" "${current_versions[@]}"; then
echo "${hit_prefix}$1 (set by $(pyenv-version-origin))" echo "${hit_prefix}$1 (set by $(pyenv-version-origin))"
else else
echo "${miss_prefix}$1" echo "${miss_prefix}$1"