vendor: bump urfave/cli to v1.22.6

This finally fixes the regression of not allowing -1 as an argument,
which is reported in https://github.com/urfave/cli/pull/1135.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-04-21 19:36:49 -07:00
parent 238717ddd3
commit 9c710564fd
18 changed files with 359 additions and 2163 deletions
+10 -1
View File
@@ -87,6 +87,14 @@ func (c *Context) IsSet(name string) bool {
for _, f := range flags {
eachName(f.GetName(), func(name string) {
if isSet, ok := c.setFlags[name]; isSet || !ok {
// Check if a flag is set
if isSet {
// If the flag is set, also set its other aliases
eachName(f.GetName(), func(name string) {
c.setFlags[name] = true
})
}
return
}
@@ -316,11 +324,12 @@ func checkRequiredFlags(flags []Flag, context *Context) requiredFlagsErr {
var flagPresent bool
var flagName string
for _, key := range strings.Split(f.GetName(), ",") {
key = strings.TrimSpace(key)
if len(key) > 1 {
flagName = key
}
if context.IsSet(strings.TrimSpace(key)) {
if context.IsSet(key) {
flagPresent = true
}
}