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"
9393user_scripts = " virtualenvwrapper.user_scripts:post_activate_source"
9494
9595[project .entry-points ."virtualenvwrapper .pre_deactivate_source" ]
96+ project = " virtualenvwrapper.project:pre_deactivate_source"
9697user_scripts = " virtualenvwrapper.user_scripts:pre_deactivate_source"
9798
9899[project .entry-points ."virtualenvwrapper .post_deactivate_source" ]
Original file line number Diff line number Diff line change 88import logging
99import os
1010
11- from virtualenvwrapper .user_scripts import make_hook , run_global , PERMISSIONS
11+ from virtualenvwrapper .user_scripts import PERMISSIONS , make_hook , run_global
1212
1313log = logging .getLogger (__name__ )
1414
@@ -64,3 +64,13 @@ def post_activate_source(args):
6464 fi
6565fi
6666"""
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