Process.parse_arguments
for Windows
#12193
Labels
kind:feature
platform:windows
Windows support based on the MSVC toolchain / Win32 API
topic:stdlib:system
Process.parse_arguments
uses the POSIX parsing rules, so it can fail to parse Windows command-line arguments (that use Microsoft's C runtime, which is virtually everything). A common example is unquoted arguments containing backslashes, the preferred path separator on Windows:This was found while trying to get the interpreter compiling on Windows, where the compiler builds the list of linker arguments for passing to a
Crystal::Loader
. It is not possible to split the arguments beforehand, because we need to do this again anyway when there is any backtick expansion.The standard library should provide a portable implementation of the above method. I also suggest renaming the method so that it matches
.quote
's API:Deprecation of the existing method is likely, because directly putting
unquote
's body in it would cause a breaking change for Windows.The text was updated successfully, but these errors were encountered: