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

Allow SilenceErrors or SilenceUsage to override the rootCmd value. #2145

Open
trajano opened this issue May 8, 2024 · 0 comments
Open

Allow SilenceErrors or SilenceUsage to override the rootCmd value. #2145

trajano opened this issue May 8, 2024 · 0 comments

Comments

@trajano
Copy link

trajano commented May 8, 2024

I am trying to write something that augments the docker-cli so if it fails the parsing I would normally let it run the existing docker command. What I wanted to do though is add a new command that I know would not be in docker e.g. docker bash I would like to be able to make Cobra just show the usage or errors by setting SilenceErrors and SilenceUsage to true on the specific command

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

No branches or pull requests

1 participant