Skip to content

Commit 03a253b

Browse files
committed
virtualenvwrapper.sh: always export VIRTUALENVWRAPPER_HOOK_DIR
Previously, if VIRTUALENVWRAPPER_HOOK_DIR is set to a nonempty value but not exported, virtualenvwrapper_initialize would assume it is available in the environment, and that leads to confusing problems like #276 where user_scripts.make_hook attempts to create hooks like '/Users/jacob/venvs/$VIRTUALENVWRAPPER_HOOK_DIR/premkproject'. In this commit, we make sure VIRTUALENVWRAPPER_HOOK_DIR is always exported, so that $VIRTUALENVWRAPPER_HOOK_DIR is always expanded by user_scripts.get_path.
1 parent cee707f commit 03a253b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

virtualenvwrapper.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ function virtualenvwrapper_initialize {
304304
# Set the location of the hook scripts
305305
if [ "$VIRTUALENVWRAPPER_HOOK_DIR" = "" ]
306306
then
307-
export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME"
307+
VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME"
308308
fi
309+
export VIRTUALENVWRAPPER_HOOK_DIR
309310

310311
mkdir -p "$VIRTUALENVWRAPPER_HOOK_DIR"
311312

0 commit comments

Comments
 (0)