Ver a proveniência

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

pull/2676/head
native-api há 3 anos
committed by GitHub
ascendente
cometimento
20189ff06f
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
2 ficheiros alterados com 6 adições e 4 eliminações
  1. +1
    -1
      libexec/pyenv-versions
  2. +5
    -3
      test/versions.bats

+ 1
- 1
libexec/pyenv-versions Ver ficheiro

@ -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))
}

+ 5
- 3
test/versions.bats Ver ficheiro

@ -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
}

Carregando…
Cancelar
Guardar