File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 66
77 - Add support for ksh. Thanks to Doug Latornell for doing the
88 research on what needed to be changed.
9+ - Switch to ``tempfile`` command for creating temporary hook files.
910
10112.0.2
1112
Original file line number Diff line number Diff line change @@ -89,10 +89,11 @@ virtualenvwrapper_run_hook () {
8989 # First anything that runs directly from the plugin
9090 "$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION "$@"
9191 # Now anything that wants to run inside this shell
92+ hook_script=$(tempfile --directory "$VIRTUALENVWRAPPER_TMPDIR")
9293 "$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION \
93- --source "$@" >>$VIRTUALENVWRAPPER_TMPDIR/$$.hook
94- source $VIRTUALENVWRAPPER_TMPDIR/$$.hook
95- rm -f $VIRTUALENVWRAPPER_TMPDIR/$$.hook
94+ --source "$@" >>"$hook_script"
95+ source "$hook_script"
96+ rm -f "$hook_script"
9697}
9798
9899# Set up virtualenvwrapper properly
You can’t perform that action at this time.
0 commit comments