mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 23:43:44 -05:00
shell version set in activate should be unset in deactivate (#61)
This commit is contained in:
@@ -43,10 +43,18 @@ if [ -n "$VERBOSE" ]; then
|
||||
echo " echo \"pyenv-virtualenv: deactivate ${prefix##*/}\" 1>&2;"
|
||||
fi
|
||||
|
||||
if [ -z "${PYENV_VIRTUALENV_INIT}" ]; then
|
||||
# Backward compatibility issue
|
||||
# https://github.com/yyuu/pyenv-virtualenv/issues/26
|
||||
if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then
|
||||
# shell version set in pyenv-sh-activate should be unset
|
||||
# https://github.com/yyuu/pyenv-virtualenv/issues/61
|
||||
echo " pyenv shell --unset;"
|
||||
case "$shell" in
|
||||
fish )
|
||||
echo " set -e PYENV_ACTIVATE_SHELL;"
|
||||
;;
|
||||
* )
|
||||
echo " unset PYENV_ACTIVATE_SHELL;"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$shell" in
|
||||
|
||||
Reference in New Issue
Block a user