use PrintErrf() instead of extra call to Sprintf()

This commit is contained in:
Alessio Treglia 2020-04-12 09:55:26 +01:00
parent 0da6ddb27b
commit d7b65d7b73
No known key found for this signature in database
GPG key ID: E8A48AE5311D765A

View file

@ -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
}