Fix tests

This commit is contained in:
Naveen Gogineni
2022-10-06 20:53:05 -05:00
parent 1ada1a1c06
commit 02613e50be
6 changed files with 22 additions and 32 deletions

View File

@@ -312,7 +312,9 @@ func (c *Command) VisibleFlagCategories() []VisibleFlagCategory {
c.flagCategories = newFlagCategories()
for _, fl := range c.Flags {
if cf, ok := fl.(CategorizableFlag); ok {
c.flagCategories.AddFlag(cf.GetCategory(), cf)
if cf.GetCategory() != "" {
c.flagCategories.AddFlag(cf.GetCategory(), cf)
}
}
}
}