mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 11:01:44 +00:00
depgraph: Fix spurious error when no subcommand name is passed (#61871)
This confused me: ``` terminal command () doesn't define an Exec function ``` Now it prints a help text. Test plan: Verified the above behavior by hand.
This commit is contained in:
parent
e4042dd629
commit
9fab1b4e1d
@ -20,6 +20,9 @@ var rootFlagSet = flag.NewFlagSet("depgraph", flag.ExitOnError)
|
||||
var rootCommand = &ffcli.Command{
|
||||
ShortUsage: "depgraph [flags] <subcommand>",
|
||||
FlagSet: rootFlagSet,
|
||||
Exec: func(ctx context.Context, args []string) error {
|
||||
return flag.ErrHelp
|
||||
},
|
||||
Subcommands: []*ffcli.Command{
|
||||
summaryCommand,
|
||||
traceCommand,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user