Display error instead of just say command is incorrect

This commit is contained in:
Richard Kovacs
2016-10-07 16:38:36 +02:00
committed by mhmxs
parent 55f715e28c
commit 4cc2bad36e
3 changed files with 20 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ func (c Command) Run(ctx *Context) (err error) {
HandleExitCoder(err)
return err
}
fmt.Fprintln(ctx.App.Writer, "Incorrect Usage.")
fmt.Fprintln(ctx.App.Writer, "Incorrect Usage:", err.Error())
fmt.Fprintln(ctx.App.Writer)
ShowCommandHelp(ctx, c.Name)
return err