File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ project = "virtualenvwrapper.project:post_activate_source"
93
93
user_scripts = " virtualenvwrapper.user_scripts:post_activate_source"
94
94
95
95
[project .entry-points ."virtualenvwrapper .pre_deactivate_source" ]
96
+ project = " virtualenvwrapper.project:pre_deactivate_source"
96
97
user_scripts = " virtualenvwrapper.user_scripts:pre_deactivate_source"
97
98
98
99
[project .entry-points ."virtualenvwrapper .post_deactivate_source" ]
Original file line number Diff line number Diff line change 8
8
import logging
9
9
import os
10
10
11
- from virtualenvwrapper .user_scripts import make_hook , run_global , PERMISSIONS
11
+ from virtualenvwrapper .user_scripts import PERMISSIONS , make_hook , run_global
12
12
13
13
log = logging .getLogger (__name__ )
14
14
@@ -64,3 +64,13 @@ def post_activate_source(args):
64
64
fi
65
65
fi
66
66
"""
67
+
68
+
69
+ def pre_deactivate_source (args ):
70
+ return """
71
+ if [ -f "$VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME" ]; then
72
+ if [ -f "$(cat \" $VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME\" )/.virtualenvwrapper/predeactivate" ]; then
73
+ source "$(cat \" $VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME\" )/.virtualenvwrapper/predeactivate"
74
+ fi
75
+ fi
76
+ """
You can’t perform that action at this time.
0 commit comments