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

Control (default?) help usage printing by cobra upon CLI operational errors #38

Closed
navidshaikh opened this issue Mar 6, 2019 · 0 comments
Milestone

Comments

@navidshaikh
Copy link
Collaborator

If there is an error in an operation directed via CLI, CLI prints the error and prints the help usage as well.
This makes reading the error about operation a bit more difficult. One has to locate what went wrong in the text printed on stdout. Apparently, it seems its a default behavior of cobra. This issue is to track controlling the default stdout text printing behavior.

knative-prow-robot pushed a commit that referenced this issue Mar 29, 2019
* Add SilenceUsage option to cobra command

This patch adds `cmd.SilenceUsage` to command to stop usage output
after command validation.

Fixes #38

* Set cmd.SilenceUsage to global cmd
@csantanapr csantanapr added this to the v0.1.0 milestone Apr 5, 2019
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
* Move all configs related to Prow to ci dir

* Fix presubmit build test
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

2 participants