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

@@ -156,14 +156,10 @@ func (f *IntSliceFlag) Apply(set *flag.FlagSet) error {
// IntSlice looks up the value of a local IntSliceFlag, returns
// nil if not found
func (c *Context) IntSlice(name string) []int {
if fs := lookupFlagSet(name, c); fs != nil {
return lookupIntSlice(name, c.flagSet)
}
return nil
return lookupIntSlice(c.resolveFlagDeep(name))
}
func lookupIntSlice(name string, set *flag.FlagSet) []int {
f := set.Lookup(name)
func lookupIntSlice(f *flag.Flag) []int {
if f != nil {
if slice, ok := f.Value.(*IntSlice); ok {
return slice.Value()