virtualenvwrapper: add the option DEACTIVATE_VENV_ASAP to cope with issue #4603
This commit is contained in:
parent
a6ef00280a
commit
acb0a82c1d
@ -61,7 +61,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||
else
|
||||
ENV_NAME=""
|
||||
fi
|
||||
if [[ "$ENV_NAME" != "" && ("$ENV_NAME" = "$CD_VIRTUAL_ENV" || "$CD_VIRTUAL_ENV" = "" ) ]]; then
|
||||
if [[ "$ENV_NAME" != "" && ( ($DEACTIVATE_VENV_ASAP -eq 1 && ("$ENV_NAME" = "$CD_VIRTUAL_ENV" || "$CD_VIRTUAL_ENV" = "") ) || (-z $DEACTIVATE_VENV_ASAP || $DEACTIVATE_VENV_ASAP -eq 0 ) ) ]]; then
|
||||
# Activate the environment only if it is not already active
|
||||
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then
|
||||
if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user