bugfix for issue #4255, where cd can get stuck if virtualenvwrapper plugin is used in combination with WORKON_HOME and a trailing slash
This commit is contained in:
parent
192de6bcff
commit
cf8bb2983c
@ -63,7 +63,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||
fi
|
||||
if [[ "$ENV_NAME" != "" ]]; then
|
||||
# Activate the environment only if it is not already active
|
||||
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then
|
||||
if [[ "$VIRTUAL_ENV" != "${WORKON_HOME%/}/$ENV_NAME" ]]; then
|
||||
if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then
|
||||
workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME"
|
||||
elif [[ -e "$ENV_NAME/bin/activate" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user