From 9fab1b4e1d0ba8bc8a52858a4c2e322a9a06622e Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Mon, 15 Apr 2024 16:10:44 +0200 Subject: [PATCH] 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. --- dev/depgraph/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/depgraph/main.go b/dev/depgraph/main.go index 054afb4f0c0..b2df9b466d7 100644 --- a/dev/depgraph/main.go +++ b/dev/depgraph/main.go @@ -20,6 +20,9 @@ var rootFlagSet = flag.NewFlagSet("depgraph", flag.ExitOnError) var rootCommand = &ffcli.Command{ ShortUsage: "depgraph [flags] ", FlagSet: rootFlagSet, + Exec: func(ctx context.Context, args []string) error { + return flag.ErrHelp + }, Subcommands: []*ffcli.Command{ summaryCommand, traceCommand,