added exit code for policy report
@@ -346,12 +346,12 @@ func printReportOrViolation(policyReport bool, rc *common.ResultCounts, resource
fmt.Printf("\npass: %d, fail: %d, warn: %d, error: %d, skip: %d \n",
rc.Pass, rc.Fail, rc.Warn, rc.Error, rc.Skip)
}
+ }
if rc.Fail > 0 || rc.Error > 0 {
os.Exit(1)
}
}
-}
// createFileOrFolder - creating file or folder according to path provided
func createFileOrFolder(mutateLogPath string, mutateLogPathIsDir bool) error {
