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