-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Correctly return errors from command run function
Cobra will print a stacktrace if you forcibly close the process from within a cmd.Run function. Using RunE and return errors will prevent this. Cobra will print errors returned this way for you, so the fmt.Println(err) in rootCmd was redundant. Signed-off-by: Wouter Dullaert <[email protected]>
- Loading branch information
1 parent
01f87b9
commit 59f365a
Showing
2 changed files
with
11 additions
and
11 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