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