Skip to content

Commit 64b8644

Browse files
committed
Remove warning for no virtualenvs
1 parent 4897b0c commit 64b8644

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

bin/pyenv-virtualenvs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ if [[ ${BASH_VERSINFO[0]} -gt 3 ]]; then
3737
else
3838
current_versions=()
3939
fi
40-
if [[ -n $bare ]]; then
41-
include_system=""
42-
else
40+
if [[ -z $bare ]]; then
4341
hit_prefix="* "
4442
miss_prefix=" "
4543
OLDIFS="$IFS"
@@ -131,9 +129,3 @@ fi
131129

132130
shopt -u dotglob
133131
shopt -u nullglob
134-
135-
if [[ $num_versions -eq 0 ]] && [[ -n $include_system ]]; then
136-
echo "Warning: no Python virtualenv detected on the system" >&2
137-
exit 1
138-
fi
139-

test/virtualenvs.bats

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,6 @@ OUT
9898
unstub pyenv-version-origin
9999
}
100100

101-
@test "no virtualenvs warning" {
102-
rm -rf "${PYENV_ROOT}/versions"
103-
mkdir -p "${PYENV_ROOT}/versions"
104-
stub pyenv-version-name ": echo system"
105-
106-
run pyenv-virtualenvs
107-
108-
assert_failure
109-
assert_output "Warning: no Python virtualenv detected on the system"
110-
111-
unstub pyenv-version-name
112-
}
113-
114101
@test "no warning with --bare and no virtualenvs" {
115102
rm -rf "${PYENV_ROOT}/versions"
116103
mkdir -p "${PYENV_ROOT}/versions"

0 commit comments

Comments
 (0)