cmd.SilenceUsage

This commit is contained in:
Ethan Buchman 2017-04-17 19:59:22 -04:00
parent c292d54e47
commit 04f79f3ad2
2 changed files with 3 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# Changelog # Changelog
## 0.4.0 (March 30, 2017) ## 0.4.0 (TBD)
BREAKING CHANGES: BREAKING CHANGES:
- CLI now uses Cobra - CLI now uses Cobra, which forced changes to some of the flag names and orderings
IMPROVEMENTS: IMPROVEMENTS:

View File

@ -38,6 +38,7 @@ func BasecoinRoot(rootDir string) string {
func ExecuteWithDebug(RootCmd *cobra.Command) { func ExecuteWithDebug(RootCmd *cobra.Command) {
var debug bool var debug bool
RootCmd.SilenceUsage = true
RootCmd.PersistentFlags().BoolVar(&debug, "debug", false, "enables stack trace error messages") RootCmd.PersistentFlags().BoolVar(&debug, "debug", false, "enables stack trace error messages")
//note that Execute() prints the error if encountered, so no need to reprint the error, //note that Execute() prints the error if encountered, so no need to reprint the error,