Skip to content

Commit 79bfc9d

Browse files
committed
When changing from a virtualenv to "system", unset PYENV_DEACTIVATE. Previously the var remained set, which made it impossible to reactivate the previous virtualenv
1 parent 5252cd0 commit 79bfc9d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/pyenv-virtualenv-init

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ if [[ "$shell" != "fish" ]]; then
112112
if [ -n "\$PYENV_ACTIVATE" ]; then
113113
if [ "\$(pyenv version-name)" = "system" ]; then
114114
pyenv deactivate --no-error --verbose
115+
unset PYENV_DEACTIVATE
115116
return 0
116117
fi
117118
if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then

0 commit comments

Comments
 (0)