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 1
1
2010-05-16 Doug Hellmann <
[email protected] >
2
2
3
+ * virtualenvwrapper.sh (virtualenvwrapper_tempfile): Set a default
4
+ suffix of "hook" and explicitly report when we detect an error
5
+ condition.
6
+
3
7
* Makefile (PYTHON26): Use which to find python2.6, the default
4
8
interpreter, so we can run the tests as "make test-quick" on other
5
9
hosts.
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ test_dir=$(dirname $0)
6
6
7
7
export WORKON_HOME=" ${TMPDIR:-/ tmp} /WORKON_HOME"
8
8
9
+ unset HOOK_VERBOSE_OPTION
10
+
9
11
setUp () {
10
12
rm -rf " $WORKON_HOME "
11
13
mkdir -p " $WORKON_HOME "
Original file line number Diff line number Diff line change @@ -93,7 +93,14 @@ virtualenvwrapper_verify_workon_home () {
93
93
# Expects 1 argument, the suffix for the new file.
94
94
virtualenvwrapper_tempfile () {
95
95
# 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
97
104
}
98
105
99
106
# Run the hooks
You can’t perform that action at this time.
0 commit comments