Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upescaping paths on windows #1
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AndreasMadsen
Jul 29, 2014
Owner
Interresting question. I will say it is outside the scope for the following reasons:
It is not a portability issue:
This will also be an issue on unix like systems. Consider the following setup:
/
|- a b/
|- b -- #!/bin/sh \n echo "b file"
- Executing
/a b/b -vwill fail - Executing
"/a b/b" -vwill outputb file
The new behaviour would be difficult to reason about:
Consider the following setup:
/
|- a -- #!/bin/sh \n echo "a file"
|- a b/
|- b -- #!/bin/sh \n echo "b file"
- Executing
/a b/b -vwill outputa file - Executing
"/a b/b" -vwill outputb file
What should the new expected behaviour be in this case and how can one get the other result?
The behaviour would differ from require('child_process').exec:
https://github.com/joyent/node/blob/master/lib/child_process.js#L618-L619
|
Interresting question. I will say it is outside the scope for the following reasons: It is not a portability issue: This will also be an issue on unix like systems. Consider the following setup:
The new behaviour would be difficult to reason about: Consider the following setup:
What should the new expected behaviour be in this case and how can one get the other result? The behaviour would differ from https://github.com/joyent/node/blob/master/lib/child_process.js#L618-L619 |
maxogden commentedJul 29, 2014
when I run this on windows:
I get this on stderr:
but if I wrap the execPath in quotes, like this:
then it works.
In the interest of making portable code easier to write, is this something that execspawn should/could try and handle for me or is it outside of scope?