Skip to content

Commit b459977

Browse files
committed
1 parent 10a9658 commit b459977

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bin/pyenv-virtualenvs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# List all virtualenvs found in `$PYENV_ROOT/versions/*' and its `$PYENV_ROOT/versions/envs/*'.
77

88
set -e
9-
[ -n "$PYENV_DEBUG" ] && set -x
9+
[[ -n $PYENV_DEBUG ]] && set -x
1010

11-
if [ -z "$PYENV_ROOT" ]; then
11+
if [[ -z $PYENV_ROOT ]]; then
1212
PYENV_ROOT="${HOME}/.pyenv"
1313
fi
1414

@@ -39,7 +39,7 @@ if [[ ${BASH_VERSINFO[0]} -gt 3 ]]; then
3939
else
4040
current_versions=()
4141
fi
42-
if [ -n "$bare" ]; then
42+
if [[ -n $bare ]]; then
4343
include_system=""
4444
else
4545
hit_prefix="* "
@@ -118,17 +118,17 @@ if sort --version-sort </dev/null >/dev/null 2>&1; then
118118
IFS="$OLDIFS"
119119
fi
120120

121-
if [ -z "$only_aliases" ]; then
121+
if [[ -z $only_aliases ]]; then
122122
for env_path in "${venv_dir_entries[@]}"; do
123-
if [ -d "${env_path}" ]; then
123+
if [[ -d ${env_path} ]]; then
124124
print_version "${env_path#"${PYENV_ROOT}"/versions/}" "${env_path}"
125125
fi
126126
done
127127
fi
128128

129-
if [ -z "$skip_aliases" ]; then
129+
if [[ -z "$skip_aliases" ]]; then
130130
for env_path in "${version_dir_entries[@]}"; do
131-
if [ -d "${env_path}" ] && [ -L "${env_path}" ]; then
131+
if [[ -d ${env_path} ]] && [[ -L ${env_path} ]]; then
132132
print_version "${env_path#"${PYENV_ROOT}"/versions/}" "${env_path}"
133133
fi
134134
done
@@ -137,7 +137,7 @@ fi
137137
shopt -u dotglob
138138
shopt -u nullglob
139139

140-
if [ "$num_versions" -eq 0 ] && [ -n "$include_system" ]; then
140+
if [[ $num_versions -eq 0 ]] && [[ -n $include_system ]]; then
141141
echo "Warning: no Python virtualenv detected on the system" >&2
142142
exit 1
143143
fi

0 commit comments

Comments
 (0)