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-24 20:04:59 +00:00
parent 792520d313
commit 6db934853d
40 changed files with 375 additions and 303 deletions
+2 -7
View File
@@ -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 {