Skip to content

Commit ccb4c66

Browse files
authored
Remove invalid quotes and comment
Since CMD is being passed to `Popen(..., shell=False)`, the quotes are not necessary and actually _break_ paths with spaces, since the underlying `CreateProcess` call cannot handle quotes around the process path. Tested with Python 2.6, 2.7, 3.2 and 3.5.
1 parent 4b707b8 commit ccb4c66

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

virtualenv.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,12 +1370,6 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
13701370
else:
13711371
copyfile(py_executable, full_pth, symlink)
13721372

1373-
if is_win and ' ' in py_executable:
1374-
# There's a bug with subprocess on Windows when using a first
1375-
# argument that has a space in it. Instead we have to quote
1376-
# the value:
1377-
py_executable = '"%s"' % py_executable
1378-
# NOTE: keep this check as one line, cmd.exe doesn't cope with line breaks
13791373
cmd = [py_executable, '-c', 'import sys;out=sys.stdout;'
13801374
'getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))']
13811375
logger.info('Testing executable with %s %s "%s"' % tuple(cmd))

0 commit comments

Comments
 (0)