From a7b181c3caf98aa1aed224b02b5c3c3da108241f Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Mon, 6 Feb 2023 09:09:26 +0300 Subject: [PATCH] Fix link resolving in pyenv-versions Co-Authored-by: Ivan Pozdeev --- libexec/pyenv-versions | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libexec/pyenv-versions b/libexec/pyenv-versions index 3aaaa055..85f44085 100755 --- a/libexec/pyenv-versions +++ b/libexec/pyenv-versions @@ -112,7 +112,7 @@ print_version() { if [[ -L "$path" ]]; then # Only resolve the link itself for printing, do not resolve further. # Doing otherwise would misinform the user of what the link contains. - version_repr="$version --> $(resolve_link "$path")" + version_repr="$version --> $(readlink "$path")" else version_repr="$version" fi @@ -157,12 +157,12 @@ for path in "${versions_dir_entries[@]}"; do print_version "${path##*/}" "$path" # virtual environments created by anaconda/miniconda/pyenv-virtualenv if [[ -z $skip_envs ]]; then - for env_path in "${path}/envs/"*; do - if [ -d "${env_path}" ]; then - print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}" - fi - done - fi + for env_path in "${path}/envs/"*; do + if [ -d "${env_path}" ]; then + print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}" + fi + done + fi fi done shopt -u dotglob nullglob