mirror of
https://github.com/spf13/cobra
synced 2025-04-27 09:07:19 +00:00
[fix] Forgot to change c.ErrPrefix()
to cmd.ErrPrefix()
To use an error prefix of subcommand as well.
This commit is contained in:
parent
f2b602c663
commit
5dec565c90
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue