From edf1d221d39d352491fb135c1f4eac7ce1c5283e Mon Sep 17 00:00:00 2001 From: Nasir Rabbani Date: Tue, 22 Feb 2022 17:22:26 +0530 Subject: [PATCH] skip terrascan init for --config-with-error flag --- pkg/cli/scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/scan.go b/pkg/cli/scan.go index a73a32dea..dde4f708d 100644 --- a/pkg/cli/scan.go +++ b/pkg/cli/scan.go @@ -36,7 +36,7 @@ var scanCmd = &cobra.Command{ Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure. `, PreRunE: func(cmd *cobra.Command, args []string) error { - if scanOptions.configOnly { + if scanOptions.configOnly || scanOptions.configWithError { return nil } return initial(cmd, args, true)