File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 112010-05-16 Doug Hellmann <
[email protected] >
22
3+ * virtualenvwrapper.sh (virtualenvwrapper_tempfile): Set a default
4+ suffix of "hook" and explicitly report when we detect an error
5+ condition.
6+
37 * Makefile (PYTHON26): Use which to find python2.6, the default
48 interpreter, so we can run the tests as "make test-quick" on other
59 hosts.
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ test_dir=$(dirname $0)
66
77export WORKON_HOME=" ${TMPDIR:-/ tmp} /WORKON_HOME"
88
9+ unset HOOK_VERBOSE_OPTION
10+
911setUp () {
1012 rm -rf " $WORKON_HOME "
1113 mkdir -p " $WORKON_HOME "
Original file line number Diff line number Diff line change @@ -93,7 +93,14 @@ virtualenvwrapper_verify_workon_home () {
9393# Expects 1 argument, the suffix for the new file.
9494virtualenvwrapper_tempfile () {
9595 # Note: the 'X's must come last
96- mktemp -t " virtualenvwrapper-$1 -XXXXXX"
96+ typeset suffix=${1:- hook}
97+ mktemp -t " virtualenvwrapper-$suffix -XXXXXXXXXX"
98+ if [ $? -ne 0 ]
99+ then
100+ echo " ERROR: virtualenvwrapper could not create a temporary file name." 1>&2
101+ return 1
102+ fi
103+ return 0
97104}
98105
99106# Run the hooks
You can’t perform that action at this time.
0 commit comments