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

Unnecessary warnings when command flags are marked as deprecated #525

Closed
ryan-cahill opened this issue Oct 17, 2022 · 0 comments · Fixed by #527
Closed

Unnecessary warnings when command flags are marked as deprecated #525

ryan-cahill opened this issue Oct 17, 2022 · 0 comments · Fixed by #527

Comments

@ryan-cahill
Copy link

Is your feature request related to a problem? Please describe.
I noticed that there was an update with version 1.18.0 to show that commands or flags are deprecated. I attempted to use this new feature with certain flags that are part of my application, but ran into what feels like a UX issue. With this update, no matter what flags are actually used, warnings about all of the deprecated flags of a command will be printed.

For example, this test shows that the flag name is deprecated. However, even though the command is run with no flags, a warning about the deprecated command is expected to be printed.

This situation could produce a lot of spam and be confusing for the user, especially if there are many deprecated flags in the command class none of which the user included in the actual command.

Describe the solution you'd like
The logic for deprecated flags should only print a warning for the deprecated command(s) that a user actually used. If I used two out of four deprecated flags, I'd expect two warnings. If I didn't use any deprecated commands, I'd expect no warnings.

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 a pull request may close this issue.

1 participant