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

fix(ArgumentParser): Correct default programName when run via wrapper #233

Merged
merged 1 commit into from Feb 28, 2024

Conversation

bartelink
Copy link
Member

When running via a wrapper such as dotnet or dotnet tool run (see #232 for more of the full scenario), the default logic derives the programName as dotnet, i.e. the exit error message becomes:

ERROR: unrecognized argument: 'equinox-common-test'.
USAGE: dotnet sync cosmos <snipped>

Another common case of this is that VS in ~2019 used to run in a wrapper, so the message would be correct if you Ctrl-F5 run, but not if you F5-run; who knows if that has changed...

@bartelink
Copy link
Member Author

This is prompted by me carted along messy code that overrides this for years.

I removed my shims recently, having erroneously assumed it was fixed, so I'm proposing this breaking change, for better or worse!

If anyone is concerned this is too heavy a change, then I can make a new static method to opt-in, as laid out in #171 (comment)

Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to have.
Thanks

@bartelink bartelink merged commit 5fb339f into fsprojects:master Feb 28, 2024
4 checks passed
@bartelink bartelink deleted the entry-program-name branch February 28, 2024 10:50
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.

None yet

2 participants