TUN-3964: Revert "TUN-3922: Repoint urfave/cli/v2 library at patched branch at github.com/ipostelnik/cli/v2@fixed which correctly handles reading flags declared at multiple levels of subcommands."

This reverts commit 1670ee87fb.
This commit is contained in:
cthuang
2021-02-23 12:23:57 +00:00
committed by Chung Ting Huang
parent e9c2afec56
commit 9d5bd256be
37 changed files with 274 additions and 307 deletions

View File

@@ -150,6 +150,7 @@ func (c *Command) Run(ctx *Context) (err error) {
if c.Before != nil {
err = c.Before(context)
if err != nil {
_ = ShowCommandHelp(context, c.Name)
context.App.handleExitCoder(context, err)
return err
}
@@ -241,9 +242,8 @@ func (c *Command) startApp(ctx *Context) error {
app.HideHelpCommand = c.HideHelpCommand
app.Version = ctx.App.Version
app.HideVersion = true
app.HideVersion = ctx.App.HideVersion
app.Compiled = ctx.App.Compiled
app.Reader = ctx.App.Reader
app.Writer = ctx.App.Writer
app.ErrWriter = ctx.App.ErrWriter
app.ExitErrHandler = ctx.App.ExitErrHandler