Fix not showing symlink contents for unselected versions in pyenv versions (#2675)

This commit is contained in:
native-api 2023-04-08 01:12:09 +03:00 committed by GitHub
parent 5a8dbcf143
commit 20189ff06f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

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

View file

@ -238,11 +238,13 @@ OUT
@test "non-bare output shows symlink contents" {
create_version "1.9.0"
create_alias "link" "foo/bar"
create_alias "link" "1.9.0"
run pyenv-versions
assert_success <<OUT
assert_success
assert_output <<OUT
* system (set by ${PYENV_ROOT}/version)
1.9.0
link --> foo/bar
link --> 1.9.0
OUT
}