TUN-3963: 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 commit is contained in:
Igor Postelnik
2021-02-23 13:48:32 -06:00
parent 792520d313
commit 6db934853d
40 changed files with 380 additions and 308 deletions

View File

@@ -86,14 +86,10 @@ func (f *Int64Flag) Apply(set *flag.FlagSet) error {
// Int64 looks up the value of a local Int64Flag, returns
// 0 if not found
func (c *Context) Int64(name string) int64 {
if fs := lookupFlagSet(name, c); fs != nil {
return lookupInt64(name, fs)
}
return 0
return lookupInt64(c.resolveFlagDeep(name))
}
func lookupInt64(name string, set *flag.FlagSet) int64 {
f := set.Lookup(name)
func lookupInt64(f *flag.Flag) int64 {
if f != nil {
parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
if err != nil {