cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Allow `SilenceErrors` or `SilenceUsage` to override the rootCmd value.

Open trajano opened this issue 1 month ago • 0 comments

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

trajano avatar May 08 '24 01:05 trajano