Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
1e615b71
Unverified
Commit
1e615b71
authored
Feb 10, 2022
by
Zachary Cutlip
Committed by
GitHub
Feb 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(virtualenvwrapper): only deactivate if virtual env is still present (#10671)
parent
0da33ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
virtualenvwrapper.plugin.zsh
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+7
-1
No files found.
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
View file @
1e615b71
...
...
@@ -56,7 +56,13 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
if
[[
-n
$CD_VIRTUAL_ENV
&&
"
$ENV_NAME
"
!=
"
$CD_VIRTUAL_ENV
"
]]
;
then
# We've just left the repo, deactivate the environment
# Note: this only happens if the virtualenv was activated automatically
deactivate
&&
unset
CD_VIRTUAL_ENV
if
[[
-n
"
$VIRTUAL_ENV
"
]]
;
then
# Only deactivate if VIRTUAL_ENV was set
# User may have deactivated manually or via another mechanism
deactivate
fi
# clean up regardless
unset
CD_VIRTUAL_ENV
fi
if
[[
"
$ENV_NAME
"
!=
""
]]
;
then
# Activate the environment only if it is not already active
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment