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
Sys.command and Windows quoting #7672
Comments
Comment author: @xavierleroy That's not the first time we discuss the weird quoting conventions of cmd.exe. I'll try to find the relevant problem reports and link them here. I'm not opposed to have a quoting function for invoking Sys.command as envisioned in the PR; only, it should be called Sys.quote_command because it has nothing to do with Filenames. |
Comment author: @xavierleroy On second thoughts, I'm not so sure that it should be called Sys.quote_command. That would probably create a circular dependency between modules Sys and Filename. |
Comment author: @xavierleroy Pull request here: #1492 The suggested "Sys.run" is unhelpful, I think, because if you want file redirections or pipes or other special shell characters in the command given to Sys.command, they must NOT be escaped. The documentation included in the pull request points this out. |
Fixed by #1492 |
Original bug ID: 7672
Reporter: @Chris00
Status: acknowledged (set by @xavierleroy on 2017-11-17T18:21:08Z)
Resolution: open
Priority: normal
Severity: minor
Platform: x86_64
OS: GNU/Linux
OS Version: Debian testing
Version: 4.06.0
Category: standard library
Related to: #6107 #7794
Monitored by: @gasche
Bug description
When quoting several arguments in a command that will be sent to Sys.command, on must also quote the whole string for Windows cmd. This was discussed in ocaml/dune#322 ; the Windows quoting rules are at
Given these unusual quoting rules, adding a function to quote a full command (such as Filename.quote_command : string list -> string) should be discussed.
The text was updated successfully, but these errors were encountered: