diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-02-02 11:30:40 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-02-02 11:31:19 +0100 |
commit | 2d18fa63c17734b34f42f0f223f442ee65e488f2 (patch) | |
tree | a33470e6e1253952ed9cbabe763f0e212d3d6a18 /client | |
parent | 14fd08d0a0615d2b64e5432e0105e225832e2085 (diff) |
Exit with non-zero if no arguments are given
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/root.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/go/cmd/root.go b/client/go/cmd/root.go index 087be7c352d..63491f840e9 100644 --- a/client/go/cmd/root.go +++ b/client/go/cmd/root.go @@ -31,6 +31,10 @@ Vespa documentation: https://docs.vespa.ai`, PersistentPreRun: func(cmd *cobra.Command, args []string) { configureOutput() }, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + // Root command does nothing useful by itself + }, } targetArg string |