1. Armin Ronacher
  2. virtualenv

Commits

ianb  committed 5068654

[svn r3604] Add quotes on win32 when there is a space in the destination path

  • Participants
  • Parent commits cbd2f25
  • Branches trunk

Comments (0)

Files changed (1)

File virtualenv.py

View file
             os.unlink(pth)
         os.symlink('python', pth)
 
+    if sys.platform == 'win32' and ' ' in py_executable:
+        # There's a bug with subprocess on Windows when using a first
+        # argument that has a space in it.  Instead we have to quote
+        # the value:
+        py_executable = '"%s"' % py_executable
     cmd = [py_executable, '-c', 'import sys; print sys.prefix']
     logger.info('Testing executable with %s %s "%s"' % tuple(cmd))
     proc = subprocess.Popen(cmd,