rancher / kim

In ur kubernetes, buildin ur imagez
Apache License 2.0
326 stars 19 forks source link

Consider not showing usage instructions for all errors #63

Open mook-as opened 3 years ago

mook-as commented 3 years ago

Current, if any errors happen when running kim (for example, because the server isn't ready yet), the usage instructions get shown. This is, in many situations, not helpful; it obscures the actual error message, and instead is likely to lead the user to chase down red herrings in command invocation.

Unfortunately, it looks like that cobra isn't great at this; see https://github.com/epinio/epinio/pull/539 for a PR where a similar result is achieved by manually setting cmd.SilenceUsage all over the place. It's unclear if there is a better way to do this.