mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 06:29:59 +00:00
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:

committed by
Chung Ting Huang

parent
e9c2afec56
commit
9d5bd256be
8
vendor/github.com/urfave/cli/v2/flag_int_slice.go
generated
vendored
8
vendor/github.com/urfave/cli/v2/flag_int_slice.go
generated
vendored
@@ -156,10 +156,14 @@ 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 {
|
||||
return lookupIntSlice(c.resolveFlagDeep(name))
|
||||
if fs := lookupFlagSet(name, c); fs != nil {
|
||||
return lookupIntSlice(name, c.flagSet)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func lookupIntSlice(f *flag.Flag) []int {
|
||||
func lookupIntSlice(name string, set *flag.FlagSet) []int {
|
||||
f := set.Lookup(name)
|
||||
if f != nil {
|
||||
if slice, ok := f.Value.(*IntSlice); ok {
|
||||
return slice.Value()
|
||||
|
Reference in New Issue
Block a user