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
The unknown commnd error should be easily recognizable #1077
Comments
@JAicewizard Could you provide some more details on what errors seem indistinguishable? Is this something that suggestions could help with? |
when running |
@JAicewizard, it seems pretty common to me to return an error in the case of an unknown command. Much like many other CLIs, when they are misused, an error and usage message is returned to the caller. Are you returning errors to the caller with |
@jharshman I dont use RunE, and usually in go once the error has been handled properly it doesn't get propagated up. The |
@JAicewizard , I understand where you're coming from. However, in this case, the correct response to an unknown command error is to return it to the user. This is common behavior among other CLI utilities. |
This issue is being marked as stale due to a long period of inactivity |
I think we can close this issue if this is not intended behavior. WDYT? @jharshman |
Agreed, focus should instead be on consistent error propagation as is being discussed in #1156. |
Currently an unknown command error is indistinguishable from any other error from within cobra, so it is hard to differentiate between actual errors, and the user mistyping something.
The text was updated successfully, but these errors were encountered: