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-24 20:04:59 +00:00
parent 792520d313
commit 6db934853d
40 changed files with 375 additions and 303 deletions
+2 -6
View File
@@ -86,14 +86,10 @@ func (f *Uint64Flag) GetValue() string {
// Uint64 looks up the value of a local Uint64Flag, returns
// 0 if not found
func (c *Context) Uint64(name string) uint64 {
if fs := lookupFlagSet(name, c); fs != nil {
return lookupUint64(name, fs)
}
return 0
return lookupUint64(c.resolveFlagDeep(name))
}
func lookupUint64(name string, set *flag.FlagSet) uint64 {
f := set.Lookup(name)
func lookupUint64(f *flag.Flag) uint64 {
if f != nil {
parsed, err := strconv.ParseUint(f.Value.String(), 0, 64)
if err != nil {