Fix tests

This commit is contained in:
Naveen Gogineni
2022-10-11 16:28:12 -04:00
parent a9d6b0d821
commit 4a109bc0ce
4 changed files with 7 additions and 9 deletions

6
app.go
View File

@@ -198,9 +198,11 @@ func (a *App) Setup() {
var newCommands []*Command
for _, c := range a.Commands {
if c.HelpName == "" {
c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name)
cname := c.Name
if c.HelpName != "" {
cname = c.HelpName
}
c.HelpName = fmt.Sprintf("%s %s", a.HelpName, cname)
c.flagCategories = newFlagCategoriesFromFlags(c.Flags)
newCommands = append(newCommands, c)