From a0eec582999df9aeaa17fcd4a9ddbf958d940c13 Mon Sep 17 00:00:00 2001 From: Alastair Pitts Date: Mon, 16 Sep 2024 15:44:21 +1000 Subject: [PATCH] fix: no program args now outputs the root help again (#398) --- pkg/cmd/root/root.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/root/root.go b/pkg/cmd/root/root.go index 11c465e6..2e5ea668 100644 --- a/pkg/cmd/root/root.go +++ b/pkg/cmd/root/root.go @@ -133,10 +133,10 @@ func NewCmdRoot(f factory.Factory, clientFactory apiclient.ClientFactory, askPro cmd.RunE = func(cmd *cobra.Command, args []string) error { if versionParameter { - versionCommand.RunE(cmd, args) + return versionCommand.RunE(cmd, args) + } else { + return cmd.Help() } - - return nil } return cmd