From 03aabcda72c59d327a9090c0e156b42e46bdd323 Mon Sep 17 00:00:00 2001 From: Austin Riendeau Date: Sun, 25 Oct 2015 21:17:39 -0600 Subject: [PATCH] adds inheritance for SilenceErrors --- command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command.go b/command.go index 89854cb..9fdb182 100644 --- a/command.go +++ b/command.go @@ -637,7 +637,8 @@ func (c *Command) Execute() (err error) { err = cmd.execute(flags) if err != nil { - if !cmd.SilenceErrors { + // If root is silenced, all subcommands should have the same + if !cmd.SilenceErrors && !c.SilenceErrors { if err == flag.ErrHelp { cmd.HelpFunc()(cmd, args) return nil