This commit is contained in:
Roberto Haddock Lobo 2012-12-15 14:35:06 -08:00
commit b7d8275bcf

View file

@ -19,7 +19,10 @@ if [[ -f "$wrapsource" ]]; 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
workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME"
if [[ -z ${CD_VIRTUAL_ENV} ]]; then
export CD_VIRTUAL_ENV="$ENV_NAME"
workon "$ENV_NAME" || unset CD_VIRTUAL_ENV
fi
fi
fi
elif [ $CD_VIRTUAL_ENV ]; then