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 6
6
7
7
- Add support for ksh. Thanks to Doug Latornell for doing the
8
8
research on what needed to be changed.
9
+ - Switch to ``tempfile `` command for creating temporary hook files.
9
10
10
11
2.0.2
11
12
Original file line number Diff line number Diff line change @@ -89,10 +89,11 @@ virtualenvwrapper_run_hook () {
89
89
# First anything that runs directly from the plugin
90
90
" $VIRTUALENVWRAPPER_PYTHON " -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION " $@ "
91
91
# Now anything that wants to run inside this shell
92
+ hook_script=$( tempfile --directory " $VIRTUALENVWRAPPER_TMPDIR " )
92
93
" $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 "
96
97
}
97
98
98
99
# Set up virtualenvwrapper properly
You can’t perform that action at this time.
0 commit comments