When changing from a virtualenv to "system", unset PYENV_DEACTIVATE. Previously the var remained set, which made it impossible to reactivate the previous virtualenv

This commit is contained in:
Beau Barker
2014-09-17 19:50:41 +10:00
parent 5252cd0777
commit 79bfc9d362

View File

@@ -112,6 +112,7 @@ if [[ "$shell" != "fish" ]]; then
if [ -n "\$PYENV_ACTIVATE" ]; then if [ -n "\$PYENV_ACTIVATE" ]; then
if [ "\$(pyenv version-name)" = "system" ]; then if [ "\$(pyenv version-name)" = "system" ]; then
pyenv deactivate --no-error --verbose pyenv deactivate --no-error --verbose
unset PYENV_DEACTIVATE
return 0 return 0
fi fi
if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then