diff --git a/bin/pyenv-virtualenv-init b/bin/pyenv-virtualenv-init index 5016537..1ab8edb 100755 --- a/bin/pyenv-virtualenv-init +++ b/bin/pyenv-virtualenv-init @@ -115,7 +115,7 @@ if [[ "$shell" != "fish" ]]; then return 0 fi if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then - if [ pyenv deactivate --no-error --verbose ]; then + if pyenv deactivate --no-error --verbose; then pyenv activate --no-error --verbose || unset PYENV_DEACTIVATE else pyenv activate --no-error --verbose