mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
Show venvs created from system Python
Venvs created from system Python are directories, not sym links. The previous code only displayed venvs that were a directory and a symlink. Now check for directory existence and symlink status, or directory existence and the presence of bin/activate within the directory.
This commit is contained in:
parent
7e89747ae8
commit
19efcdcd80
|
|
@ -116,13 +116,17 @@ for env_path in "${venv_dir_entries[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
if [[ -z "$skip_aliases" ]]; then
|
||||
for env_path in "${version_dir_entries[@]}"; do
|
||||
if [[ -d ${env_path} ]] && [[ -L ${env_path} ]]; then
|
||||
for env_path in "${version_dir_entries[@]}"; do
|
||||
if [[ -d ${env_path} ]]; then
|
||||
if [[ -L ${env_path} ]]; then
|
||||
if [[ -z $skip_aliases ]]; then
|
||||
print_version "${env_path#"${PYENV_ROOT}"/versions/}" "${env_path}"
|
||||
fi
|
||||
elif [[ -f "${env_path}/bin/activate" ]]; then
|
||||
print_version "${env_path#"${PYENV_ROOT}"/versions/}" "${env_path}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
shopt -u dotglob
|
||||
shopt -u nullglob
|
||||
|
|
|
|||
Loading…
Reference in a new issue