1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

added exit code for policy report

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
This commit is contained in:
NoSkillGirl 2021-09-03 17:17:22 +05:30
parent 6650d36e04
commit 39c58f661f

View file

@ -346,10 +346,10 @@ 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)
}
if rc.Fail > 0 || rc.Error > 0 {
os.Exit(1)
}
}