This commit is contained in:
namusyaka 2020-12-05 04:34:11 +09:00 committed by GitHub
parent 39b5a91b20
commit 7df62f7668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -964,13 +964,13 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
return cmd, nil
}
// If root command has SilentErrors flagged,
// If root command has SilenceErrors flagged,
// all subcommands should respect it
if !cmd.SilenceErrors && !c.SilenceErrors {
c.PrintErrln("Error:", err.Error())
}
// If root command has SilentUsage flagged,
// If root command has SilenceUsage flagged,
// all subcommands should respect it
if !cmd.SilenceUsage && !c.SilenceUsage {
c.Println(cmd.UsageString())