mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 14:33:52 -05:00
Add tests for activate and deactivate
This commit is contained in:
@@ -20,6 +20,11 @@ if [ "$1" = "--complete" ]; then
|
||||
exec pyenv-virtualenvs --bare
|
||||
fi
|
||||
|
||||
if [ "$1" = "--unset" ]; then
|
||||
echo "pyenv deactivate"
|
||||
exit
|
||||
fi
|
||||
|
||||
versions=("$@")
|
||||
shell="$(basename "${PYENV_SHELL:-$SHELL}")"
|
||||
|
||||
@@ -29,11 +34,6 @@ if [ -z "$versions" ]; then
|
||||
IFS="$OLDIFS"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--unset" ]; then
|
||||
echo "pyenv deactivate"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "${#versions[@]}" -gt 1 ]; then
|
||||
echo "pyenv-virtualenv: cannot activate multiple versions at once: ${versions[@]}" 1>&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user