Skip to content

Commit d1b2e4c

Browse files
committed
predeactivate and postactivate hooks
--HG-- extra : convert_revision : svn%3A98f53aa3-d424-0410-b225-a548b0275c4d/Projects/virtualenvwrapper/trunk%401355
1 parent 82862ed commit d1b2e4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

virtualenvwrapper_bashrc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ function workon () {
8787
echo "ERROR: No activate for $WORKON_HOME/$env_name"
8888
return 1
8989
fi
90+
if [ -f "$VIRTUAL_ENV/bin/predeactivate" ]
91+
then
92+
source "$VIRTUAL_ENV/bin/predeactivate"
93+
fi
9094
source "$activate"
91-
if [ -f "$WORKON_HOME/$env_name/bin/workdir" ]
95+
if [ -f "$VIRTUAL_ENV/bin/postactivate" ]
9296
then
93-
source "$WORKON_HOME/$env_name/bin/workdir"
97+
source "$VIRTUAL_ENV/bin/postactivate"
9498
fi
9599
return 0
96100
}

0 commit comments

Comments
 (0)