Skip to content
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

fixing command-line parsing in self-contained builds #528

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Conversation

brettsam
Copy link
Member

@brettsam brettsam commented Jul 7, 2021

Fixes #464

The functions host will always pass us the full assembly path as the first argument during startup. On Linux, this begins with /, which is interpreted as a switch by the dotnet CommandLineConfigurationSource. We had been wrapping this in quotes, which does work.

However, in self-contained scenarios, this argument gets passed to us twice. Once by dotnet, and once by the host. We need to wrap both of these in quotes or else you end up with the host argument being misinterpreted.

@brettsam brettsam requested review from fabiocav and ankitkumarr July 7, 2021 15:46
@fabiocav fabiocav merged commit 3e65d91 into main Jul 14, 2021
@fabiocav fabiocav deleted the brettsam/cmd branch July 14, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.UriFormatException: Invalid URI: The hostname could not be parsed'
3 participants