Eryk Sun <eryk...@gmail.com> added the comment:

Why are new versions getting added to an issue that was closed 5 years ago? 

That said, I'd like to clarify that this was not and is not a bug. It happens 
that the CMD shell strips quotes out, but that doesn't make it valid. PATH in 
Windows is delimited by semicolons, not spaces, so paths with spaces should 
never be quoted. In particular, WINAPI SearchPathW, which CreateProcessW calls, 
leaves quotes in the directory name when testing whether a file is in the 
directory.

Also, the conclusion that Linux doesn't suffer from this problem is incorrect. 
The shell command that was used actually strips the quotes out as part of 
command-line pre-processing, i.e. `PATH=$PATH:"test"` results in the same PATH 
value as `PATH=$PATH:test`. But it will fail to find "script.sh" if you escape 
the quotes to make the shell add them literally to PATH, e.g. 
`PATH=$PATH:\"test\"`.

----------
nosy: +eryksun
resolution: wont fix -> not a bug

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue17023>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to