From 8f54d333da12f0bcc7690c4369b06bf077e0803e Mon Sep 17 00:00:00 2001 From: Parthiba-Hazra Date: Sat, 26 Aug 2023 12:58:55 +0530 Subject: [PATCH] analyze command should not run analysis when --help option is set Signed-off-by: Parthiba-Hazra --- cmd/analyzer/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/analyzer/main.go b/cmd/analyzer/main.go index 97b4e87a..834ebf9c 100644 --- a/cmd/analyzer/main.go +++ b/cmd/analyzer/main.go @@ -67,6 +67,8 @@ func init() { func main() { if err := rootCmd.Execute(); err != nil { println(err.Error()) + } else if rootCmd.Flags().Changed("help") { + return } // This will globally prevent the yaml library from auto-wrapping lines at 80 characters