mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 05:49:57 +00:00
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:
8
vendor/github.com/urfave/cli/v2/flag_bool.go
generated
vendored
8
vendor/github.com/urfave/cli/v2/flag_bool.go
generated
vendored
@@ -87,14 +87,10 @@ func (f *BoolFlag) Apply(set *flag.FlagSet) error {
|
||||
// Bool looks up the value of a local BoolFlag, returns
|
||||
// false if not found
|
||||
func (c *Context) Bool(name string) bool {
|
||||
if fs := lookupFlagSet(name, c); fs != nil {
|
||||
return lookupBool(name, fs)
|
||||
}
|
||||
return false
|
||||
return lookupBool(c.resolveFlagDeep(name))
|
||||
}
|
||||
|
||||
func lookupBool(name string, set *flag.FlagSet) bool {
|
||||
f := set.Lookup(name)
|
||||
func lookupBool(f *flag.Flag) bool {
|
||||
if f != nil {
|
||||
parsed, err := strconv.ParseBool(f.Value.String())
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user