fix required/xor behavior w/ > 2 flags

This commit is contained in:
pyq-lsa
2022-01-29 13:23:26 -08:00
committed by Alec Thomas
parent e49700181c
commit ab085f771e
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -793,8 +793,8 @@ func checkMissingFlags(flags []*Flag) error {
missing = append(missing, flag.Summary())
}
}
for _, flags := range xorGroup {
if len(flags) > 1 {
for xor, flags := range xorGroup {
if !xorGroupSet[xor] && len(flags) > 1 {
missing = append(missing, strings.Join(flags, " or "))
}
}