diff --git a/bin/pyenv-virtualenvs b/bin/pyenv-virtualenvs index 09769f1..2a95bbb 100755 --- a/bin/pyenv-virtualenvs +++ b/bin/pyenv-virtualenvs @@ -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 - diff --git a/test/virtualenvs.bats b/test/virtualenvs.bats index 8863c94..3be6359 100644 --- a/test/virtualenvs.bats +++ b/test/virtualenvs.bats @@ -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"