mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
+10
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user