Wrong help output when a Command has "HideHelpCommand=true" but no defined subcommands #1879
Open
3 tasks done
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
My urfave/cli version is
v2.27.1
Checklist
Dependency Management
Describe the bug
When
HideHelpCommand
is set totrue
on a command with no subcommands, the help text output by[...] mycmd --help
imples there are subcommands, when in fact there are none. By comparison, the text output by[...] help mycmd
is correct, though!To reproduce
Observed behavior
The former execution presents the usage:
While the latter presents the (incorrect) usage:
Expected behavior
The two outputs should match. The help calls are equivalent, and the latter output is misleading.
Additional context
Playground of the broken code: https://go.dev/play/p/kCuTCXk3Uxg
Run
go version
and paste its output hereN/A (Go 1.22 in the Go Playground)
Run
go env
and paste its output hereN/A (Go 1.22 in the Go Playground)
The text was updated successfully, but these errors were encountered: