mirror of
https://github.com/spf13/cobra
synced 2025-05-07 13:57:21 +00:00
use PrintErrf() instead of extra call to Sprintf()
This commit is contained in:
parent
0da6ddb27b
commit
d7b65d7b73
1 changed files with 1 additions and 1 deletions
|
@ -904,7 +904,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
|||
}
|
||||
if !c.SilenceErrors {
|
||||
c.PrintErrln("Error:", err.Error())
|
||||
c.PrintErr(fmt.Sprintf("Run '%v --help' for usage.\n", c.CommandPath()))
|
||||
c.PrintErrf("Run '%v --help' for usage.\n", c.CommandPath())
|
||||
}
|
||||
return c, err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue