-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
area/v2relates to / is being considered for v2relates to / is being considered for v2kind/bugdescribes or fixes a bugdescribes or fixes a bugstatus/triagemaintainers still need to look into thismaintainers still need to look into this
Description
My urfave/cli version is
2.25.0
Checklist
- Are you running the latest v2 release? The list of releases is here.
- Did you check the manual for your release? The v2 manual is here
- Did you perform a search about this problem? Here's the GitHub guide about searching.
Dependency Management
- My project is using go modules.
- My project is automatically downloading the latest version.
Describe the bug
While cli top-level-command help respects CustomHelpTemplate when printing help, cli top-level-command --help ignores it and prints SubcommandHelpTemplate instead.
Is this intentional? What is the purpose of SubcommandHelpTemplate?
If this is not intentional i can send a PR switching to CustomHelpTemplate
To reproduce
app := cli.NewApp()
app.Name = "testapp"
app.Commands = []*cli.Command{
{
Name: "top-level-command",
Action: func(c *cli.Context) error { return nil },
CustomHelpTemplate: "TESTING",
}
}
go run ./cmd/app top-level-command --help
Observed behavior
It prints SubcommandHelpTemplate
Expected behavior
go run ./cmd/app top-level-command --help should print CustomHelpTemplate
Additional context
Want to fix this yourself?
Yes
Run go version and paste its output here
go version
Run go env and paste its output here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/v2relates to / is being considered for v2relates to / is being considered for v2kind/bugdescribes or fixes a bugdescribes or fixes a bugstatus/triagemaintainers still need to look into thismaintainers still need to look into this