mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Modified virtualenvwrapper plugin to prevent a possible circular execution that may happen when activating an environment.
This commit is contained in:
parent
397c085a19
commit
9b2b3f6a9a
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue