[fix] Forgot to change c.ErrPrefix() to cmd.ErrPrefix()

To use an error prefix of subcommand as well.
This commit is contained in:
Souma 2023-09-08 18:12:05 +09:00 committed by GitHub
parent f2b602c663
commit 5dec565c90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1070,7 +1070,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
c = cmd
}
if !c.SilenceErrors {
c.PrintErrln(c.ErrPrefix(), err.Error())
c.PrintErrln(cmd.ErrPrefix(), err.Error())
c.PrintErrf("Run '%v --help' for usage.\n", c.CommandPath())
}
return c, err