-
Notifications
You must be signed in to change notification settings - Fork 587
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
Incorrect argument escaping #2197
Comments
/cc @vbfox any idea? |
A few quick remarks :
The best course for me is to stop |
yes I thought I added that as well because of a previously reported issue. But I guess it doesn't apply here because his original path has spaces... Maybe we need to take a look at how to extend the current implementation without breaking too much people... |
@vbfox Honestly, if you can come up with a pr switching to your implementation while trying to keep the breaking change to a minimum I can imagine myself accepting it... |
I'm out of my league here, so feel free to ignore if this won't work. But I was thinking that you could add a new item to your This would let you keep backwards compatibility and only people who really need it can use it. |
@matthid I might try it, I just released 0.6.0 with support of Mono-on-unix specific quirks (Tested against a C# port of the original mono C source code) and tests that the current code works against .Net core implementation on unix (Both via FsCheck). So I'm starting to be relatively confident in my implementation. @Elonon There is a simpler way, as |
All the mess and netstandard2.1 will have an API for that anyway :( |
@vbfox I guess we cannot get that down to |
@vbfox is that surfaced in the library as well? It seems to not too uncommon apparently (#2206 (comment)) so maybe we need some helpers for that particular situation? |
I used (I only used |
@matthid it's not in the lib as it's code I did at work but if I remember well I didn't care doing an exact version and it's a very crude helper like |
…s workaround for #2197 and usage of external libraries like https://github.com/vbfox/FoxSharp/tree/master/src/BlackFox.CommandLine
Description
I'm using
CreateProcess
to call msdeploy.exe. Unfortunately it has unique argument requirements and the latest escaping changes broke them. For example, I need to pass-source:iisapp="C:\Some\path\"
but it's being escaped as"-source:iisapp=C:\Some\path\"
. Wrapping the entire switch in quotes is rejected.Because this scenario is likely really rare, I'd be happy if there were just some way to create a
Command
that expects me to do all escaping. E.g.Command.EscapedCommand
or something similar.Repro steps
Please provide the steps required to reproduce the problem
CreateProcess.fromRawWindowsCommandLine "tool.exe" """-source:iisapp="C:\some\path\"""
Expected behavior
emits
tool.exe -source:iisapp="C:\some\path\"
Actual behavior
emits
tool.exe "-source:iisapp=C:\some\path\"
Known workarounds
Use an older version of Fake.
Related information
The text was updated successfully, but these errors were encountered: