diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index 6e08f2747..63f11c062 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -101,6 +101,9 @@ func (l *lintCmd) run() error { if linter, err := lintChart(path, rvals, l.namespace, l.strict); err != nil { fmt.Println("==> Skipping", path) fmt.Println(err) + if err == errLintNoChart { + failures = failures + 1 + } } else { fmt.Println("==> Linting", path) diff --git a/cmd/helm/lint_test.go b/cmd/helm/lint_test.go index 7f045153c..973af9b63 100644 --- a/cmd/helm/lint_test.go +++ b/cmd/helm/lint_test.go @@ -28,6 +28,7 @@ var ( archivedChartPathWithHyphens = "testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz" invalidArchivedChartPath = "testdata/testcharts/invalidcompressedchart0.1.0.tgz" chartDirPath = "testdata/testcharts/decompressedchart/" + chartMissingManifest = "testdata/testcharts/chart-missing-manifest" ) func TestLintChart(t *testing.T) { @@ -46,4 +47,8 @@ func TestLintChart(t *testing.T) { if _, err := lintChart(invalidArchivedChartPath, values, namespace, strict); err == nil { t.Errorf("Expected a chart parsing error") } + + if _, err := lintChart(chartMissingManifest, values, namespace, strict); err == nil { + t.Errorf("Expected a chart parsing error") + } }