Ensure all flag aliases are set when Destination given

and extend "Incorrect Usage" message to show the error.

Closes #430
This commit is contained in:
Dan Buch
2016-05-23 22:00:59 -04:00
parent 685865d2d9
commit 8f25dbb615
4 changed files with 92 additions and 9 deletions

4
app.go
View File

@@ -164,7 +164,7 @@ func (a *App) Run(arguments []string) (err error) {
HandleExitCoder(err)
return err
}
fmt.Fprintf(a.Writer, "%s\n\n", "Incorrect Usage.")
fmt.Fprintf(a.Writer, "Incorrect Usage: %s\n\n", err)
ShowAppHelp(context)
return err
}
@@ -273,7 +273,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
HandleExitCoder(err)
return err
}
fmt.Fprintf(a.Writer, "%s\n\n", "Incorrect Usage.")
fmt.Fprintf(a.Writer, "Incorrect Usage: %s\n\n", err)
ShowSubcommandHelp(context)
return err
}