vendor: github.com/urfave/cli v1.22.9

The regression in v1.22.2 has been resolved, so we can drop the
replace rule and use the latest v1.22.x version.

full diff: https://github.com/urfave/cli/compare/v1.22.1...v1.22.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-05-27 11:10:14 +02:00
parent a3a2d14ecc
commit 5bb47fb956
21 changed files with 383 additions and 2178 deletions

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
}
}