cmd.SilenceUsage
This commit is contained in:
parent
c292d54e47
commit
04f79f3ad2
|
@ -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:
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue