add update integration with the help output

This commit is contained in:
Lynn Cyrin
2019-07-13 03:44:39 -07:00
parent 550ed20ea4
commit 746866c10d
3 changed files with 38 additions and 24 deletions

11
app.go
View File

@@ -209,11 +209,6 @@ func (a *App) Run(arguments []string) (err error) {
return nil
}
if cerr != nil {
ShowAppHelp(context)
return cerr
}
if err != nil {
if a.OnUsageError != nil {
err := a.OnUsageError(context, err, false)
@@ -235,6 +230,12 @@ func (a *App) Run(arguments []string) (err error) {
return nil
}
if cerr != nil {
fmt.Fprintln(a.Writer, cerr)
ShowAppHelp(context)
return cerr
}
if a.After != nil {
defer func() {
if afterErr := a.After(context); afterErr != nil {