cleanup subcommand and specs

This commit is contained in:
Lynn Cyrin
2019-07-18 00:47:18 -07:00
parent 300288670f
commit 2299852c3c
2 changed files with 3 additions and 18 deletions

4
app.go
View File

@@ -327,7 +327,6 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
set.SetOutput(ioutil.Discard)
err = set.Parse(ctx.Args().Tail())
nerr := normalizeFlags(a.Flags, set)
cerr := checkRequiredFlags(a.Flags, set)
context := NewContext(a, set, ctx)
if nerr != nil {
@@ -341,8 +340,9 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
return nerr
}
cerr := checkRequiredFlags(a.Flags, set)
if cerr != nil {
ShowAppHelp(context)
ShowSubcommandHelp(context)
return cerr
}