mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
Remove warning for no virtualenvs
This commit is contained in:
parent
5fd4975150
commit
fed3b04d2f
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue