Skip to content

Commit 418d909

Browse files
native-apisamdoran
authored andcommitted
Refactor
1 parent bedfc4c commit 418d909

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bin/pyenv-virtualenvs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ print_version() {
8383
else
8484
version_repr="$version"
8585
fi
86-
if [[ ${BASH_VERSINFO[0]} -ge 4 && ${current_versions["$1"]} ]]; then
87-
echo "${hit_prefix}${version_repr} (set by $(pyenv-version-origin))"
88-
elif [[ ${BASH_VERSINFO[0]} -le 3 ]] && exists "$1" "${current_versions[@]}"; then
86+
if [[ ${BASH_VERSINFO[0]} -gt 3 && ${current_versions["$1"]} ]] || \
87+
{ [[ ${BASH_VERSINFO[0]} -le 3 ]] && exists "$1" "${current_versions[@]}"; }; then
8988
echo "${hit_prefix}${version_repr} (set by $(pyenv-version-origin))"
9089
else
9190
echo "${miss_prefix}${version_repr}"

0 commit comments

Comments
 (0)