-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad argument escaping on Windows #3436
Comments
How does Windows parse arguments?
Note that int system(command) { return CreateProcess("cmd.exe /c " + command); } Thus, it requires additional escaping for Why does
|
quoted_node <- pure $ "\"" ++ node ++ "\"" -- Windows often have a space in the path. | |
coreLift_ $ system (quoted_node ++ " " ++ outn) |
Useful notes
While most applications follow the conventions, they are not required to. Specifically, .bat
and .cmd
scripts process arguments differently. The corresponding OpenJDK code attempts to account for this.
Windows libraries are closed source, but similar functions can be found in the ReactOS source code:
It looks like Chez still doesn't have that function |
Steps to Reproduce
Compile two programs for Windows. I use Node.js for cross-platform compilation, but the backend shouldn't matter.
Run them in
cmd
:Expected Behavior
A
system
with a list argument should properly escape the arguments so that they are passed as they were.Observed Behavior
Spaces and quotes are not properly escaped.
The text was updated successfully, but these errors were encountered: