Aliases can be duplicated between different sub commands (#419)

Make sure we remove all the aliases from the seenFlags tracker just like we do with other flags/short flags
This commit is contained in:
Adam Lesperance
2024-03-14 14:17:27 -05:00
committed by GitHub
parent 3f756c1dbd
commit 958a344920
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -170,6 +170,9 @@ MAIN:
if flag.Short != 0 {
delete(seenFlags, "-"+string(flag.Short))
}
for _, aflag := range flag.Aliases {
delete(seenFlags, "--"+aflag)
}
}
if err := validatePositionalArguments(node); err != nil {