mirror of
https://github.com/helm/helm.git
synced 2026-06-30 19:57:48 +00:00
Merge pull request #11973 from joejulian/quiet_lint
fail quiet linting when an error occurs
This commit is contained in:
@@ -53,6 +53,11 @@ func TestLintCmdWithQuietFlag(t *testing.T) {
|
||||
name: "lint chart with warning using --quiet flag",
|
||||
cmd: "lint --quiet testdata/testcharts/chart-with-only-crds",
|
||||
golden: "output/lint-quiet-with-warning.txt",
|
||||
}, {
|
||||
name: "lint non-existent chart using --quiet flag",
|
||||
cmd: "lint --quiet thischartdoesntexist/",
|
||||
golden: "",
|
||||
wantError: true,
|
||||
}}
|
||||
runTestCmd(t, tests)
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ func HasWarningsOrErrors(result *LintResult) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return len(result.Errors) > 0
|
||||
}
|
||||
|
||||
func lintChart(path string, vals map[string]interface{}, namespace string, strict bool) (support.Linter, error) {
|
||||
|
||||
Reference in New Issue
Block a user