Remove warning for no virtualenvs

This commit is contained in:
Sam Doran 2026-04-20 13:51:47 -04:00
parent 5fd4975150
commit fed3b04d2f
No known key found for this signature in database
GPG key ID: 01602635F94328AA
2 changed files with 1 additions and 22 deletions

View file

@ -37,9 +37,7 @@ if [[ ${BASH_VERSINFO[0]} -gt 3 ]]; then
else
current_versions=()
fi
if [[ -n $bare ]]; then
include_system=""
else
if [[ -z $bare ]]; then
hit_prefix="* "
miss_prefix=" "
OLDIFS="$IFS"
@ -131,9 +129,3 @@ fi
shopt -u dotglob
shopt -u nullglob
if [[ $num_versions -eq 0 ]] && [[ -n $include_system ]]; then
echo "Warning: no Python virtualenv detected on the system" >&2
exit 1
fi

View file

@ -98,19 +98,6 @@ OUT
unstub pyenv-version-origin
}
@test "no virtualenvs warning" {
rm -rf "${PYENV_ROOT}/versions"
mkdir -p "${PYENV_ROOT}/versions"
stub pyenv-version-name ": echo system"
run pyenv-virtualenvs
assert_failure
assert_output "Warning: no Python virtualenv detected on the system"
unstub pyenv-version-name
}
@test "no warning with --bare and no virtualenvs" {
rm -rf "${PYENV_ROOT}/versions"
mkdir -p "${PYENV_ROOT}/versions"