Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Conversation

@natemcmaster
Copy link

Resolves #4139. I got burned by this again recently. It seems the fix is pretty simple. Don't special case arguments that begin/end in quotes already.

@natemcmaster natemcmaster requested a review from livarcocc March 9, 2018 00:06
@natemcmaster
Copy link
Author

@dotnet-bot test OSX10.12 x64 Release Build please

@livarcocc livarcocc added this to the 2.1.3xx milestone Mar 9, 2018
@ghost
Copy link

ghost commented Mar 11, 2018

Does it fix/break or has any impact on cmd and powershell if you run dotnet run a b '" c "' d?
The reason I am asking is I have seen people handling escaping differently in Unix vs. Windows.

@natemcmaster
Copy link
Author

natemcmaster commented Mar 12, 2018

Yes, the fix has impact on Windows too. For example, in cmd:

Before:

> dotnet run """As they say, live and learn."""
0 = "As
1 = they
2 = say,
3 = live
4 = and
5 = learn."

> dotnet bin\Debug\netcoreapp2.1\test2.dll """As they say, live and learn."""
0 = "As they say, live and learn."

After

> dotnet run """As they say, live and learn."""
0 = "As they say, live and learn."

> dotnet bin\Debug\netcoreapp2.1\test2.dll """As they say, live and learn."""
0 = "As they say, live and learn."

@natemcmaster
Copy link
Author

Thanks for the review @livarcocc @peterhuene. I don't have write access to this repo so feel free to merge this when you are ready to bring it in.

@livarcocc
Copy link

Just want to note that strictly speaking, this is a breaking change, albeit I believe this is a great one. We have the wrong behavior in run and it differs when actually running the app.

FYI @KathleenDollard

I will give it a day for folks to see this message and then I will merge this tomorrow.

@livarcocc livarcocc requested a review from a team March 13, 2018 19:34
@peterhuene
Copy link

@livarcocc good to merge?

@livarcocc
Copy link

Go ahead.

@peterhuene peterhuene merged commit 4343118 into dotnet:master Mar 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

*nix: dotnet subcommands incorrectly splitting quoted args containing spaces

3 participants