-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mixer: reduce noise when commands fail
Only print errors once, not twice. Do not print usage information unless the command was called with invalid arguments. Because cobra already print its own errors, don't print them again in Execute function, just ensure we get the right exit code. Mixer errors will be handled by our code, instead of passing the errors to cobra and then later get them back. That way no usage is printed. Two helper functions were added fail/failf to perform Print+Exit. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
- Loading branch information
Showing
4 changed files
with
39 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters