From c98592ea6e714363d939a2f77767a180188e4ec6 Mon Sep 17 00:00:00 2001 From: Cerebrovinny Date: Tue, 15 Oct 2024 18:46:33 +0100 Subject: [PATCH] fix: change flag in help command --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 07b440d5e..522e8f97f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -25,7 +25,7 @@ var RootCmd = &cobra.Command{ PersistentPreRun: func(cmd *cobra.Command, args []string) { // Determine if the command is a help command or if the help flag is set isHelpCommand := cmd.Name() == "help" - helpFlag, _ := cmd.Flags().GetBool("help") + helpFlag := cmd.Flags().Changed("help") isHelpRequested := isHelpCommand || helpFlag