From e18ffb4c1e0ed47fa5f38a2e1588500a223c2dfe Mon Sep 17 00:00:00 2001 From: Serafeim Papastefanos Date: Thu, 10 Mar 2016 12:57:24 +0200 Subject: [PATCH 1/2] Run postactivate.bat hook at the end of workon.bat --- scripts/workon.bat | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/workon.bat b/scripts/workon.bat index b1d2cc3..1922cd0 100644 --- a/scripts/workon.bat +++ b/scripts/workon.bat @@ -71,4 +71,13 @@ if exist "%WORKON_HOME%\%VENV%\%VIRTUALENVWRAPPER_PROJECT_FILENAME%" ( ) ) +REM Run postactivate.bat + +if defined VIRTUALENVWRAPPER_HOOK_DIR ( + if exist "%VIRTUALENVWRAPPER_HOOK_DIR%\postactivate.bat" ( + call "%VIRTUALENVWRAPPER_HOOK_DIR%\postactivate.bat" + ) +) + + :END From 76ab30b46e23b0ce2251d8973750dee28db196ab Mon Sep 17 00:00:00 2001 From: Serafeim Papastefanos Date: Thu, 10 Mar 2016 13:02:24 +0200 Subject: [PATCH 2/2] Also update READMe for postactivate.bat --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f1be661..0e1264f 100644 --- a/README.rst +++ b/README.rst @@ -120,4 +120,4 @@ Convenience Commands Hooks ---------- -To run some commands after ``mkvirtualenv`` you can use hooks. First you need to define ``VIRTUALENVWRAPPER_HOOK_DIR`` variable. If it is set ``mkvirtualenv`` will run ``postmkvirtualenv.bat`` script from that directory. +To run some commands after ``mkvirtualenv`` you can use hooks. First you need to define ``VIRTUALENVWRAPPER_HOOK_DIR`` variable. If it is set ``mkvirtualenv`` will run ``postmkvirtualenv.bat`` script and ``workon`` will run ``postactivate.bat`` script from that directory.