Skip to content

Commit 7a8a268

Browse files
committed
Touch temporary file after a name is created
There's an issue when trying to run virtualenvwrapper.sh on windows with MinGw. The full issue was posted to http://stackoverflow.com/questions/24478623/error-virtualenvwrapper-in-gitbash/28522399 Basically, it's either windows or mktemp that's not creating the tmp file but just returning the full path of it, so just "touch"ing the file seems to solve this issue. Based on work by Abelardo Mendoza in: https://bitbucket.org/dhellmann/virtualenvwrapper/pull-request/24/touch-tmp-file-to-force-windows-to-create/diff Change-Id: I4c788686ed23c31facd7fd5538f5fabe86849a8a
1 parent dc06f76 commit 7a8a268

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

virtualenvwrapper.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ function virtualenvwrapper_tempfile {
207207
typeset file
208208

209209
file="$(virtualenvwrapper_mktemp -t virtualenvwrapper-$suffix-XXXXXXXXXX)"
210+
touch "$file"
210211
if [ $? -ne 0 ] || [ -z "$file" ] || [ ! -f "$file" ]
211212
then
212213
echo "ERROR: virtualenvwrapper could not create a temporary file name." 1>&2

0 commit comments

Comments
 (0)