mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix link resolving in pyenv-versions
Co-Authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
parent
c8c324afb4
commit
a7b181c3ca
1 changed files with 7 additions and 7 deletions
|
@ -112,7 +112,7 @@ print_version() {
|
||||||
if [[ -L "$path" ]]; then
|
if [[ -L "$path" ]]; then
|
||||||
# Only resolve the link itself for printing, do not resolve further.
|
# Only resolve the link itself for printing, do not resolve further.
|
||||||
# Doing otherwise would misinform the user of what the link contains.
|
# Doing otherwise would misinform the user of what the link contains.
|
||||||
version_repr="$version --> $(resolve_link "$path")"
|
version_repr="$version --> $(readlink "$path")"
|
||||||
else
|
else
|
||||||
version_repr="$version"
|
version_repr="$version"
|
||||||
fi
|
fi
|
||||||
|
@ -157,12 +157,12 @@ for path in "${versions_dir_entries[@]}"; do
|
||||||
print_version "${path##*/}" "$path"
|
print_version "${path##*/}" "$path"
|
||||||
# virtual environments created by anaconda/miniconda/pyenv-virtualenv
|
# virtual environments created by anaconda/miniconda/pyenv-virtualenv
|
||||||
if [[ -z $skip_envs ]]; then
|
if [[ -z $skip_envs ]]; then
|
||||||
for env_path in "${path}/envs/"*; do
|
for env_path in "${path}/envs/"*; do
|
||||||
if [ -d "${env_path}" ]; then
|
if [ -d "${env_path}" ]; then
|
||||||
print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}"
|
print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
shopt -u dotglob nullglob
|
shopt -u dotglob nullglob
|
||||||
|
|
Loading…
Reference in a new issue