diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz b/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz new file mode 100644 index 000000000..3c9c24d76 Binary files /dev/null and b/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz differ diff --git a/pkg/action/lint.go b/pkg/action/lint.go index c5a77eb4e..3cd65b6cc 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -84,7 +84,7 @@ func lintChart(path string, vals map[string]interface{}, namespace string, stric var chartPath string linter := support.Linter{} - if strings.HasSuffix(path, ".tgz") { + if strings.HasSuffix(path, ".tgz") || strings.HasSuffix(path, ".tar.gz") { tempDir, err := ioutil.TempDir("", "helm-lint") if err != nil { return linter, err diff --git a/pkg/action/lint_test.go b/pkg/action/lint_test.go index 7f7765af5..da7195d5b 100644 --- a/pkg/action/lint_test.go +++ b/pkg/action/lint_test.go @@ -26,6 +26,7 @@ var ( strict = false archivedChartPath = "../../cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz" archivedChartPathWithHyphens = "../../cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz" + archivedTarGzChartPath = "../../cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz" invalidArchivedChartPath = "../../cmd/helm/testdata/testcharts/invalidcompressedchart0.1.0.tgz" chartDirPath = "../../cmd/helm/testdata/testcharts/decompressedchart/" chartMissingManifest = "../../cmd/helm/testdata/testcharts/chart-missing-manifest" @@ -42,6 +43,9 @@ func TestLintChart(t *testing.T) { if _, err := lintChart(archivedChartPath, values, namespace, strict); err != nil { t.Error(err) } + if _, err := lintChart(archivedTarGzChartPath, values, namespace, strict); err != nil { + t.Error(err) + } if _, err := lintChart(archivedChartPathWithHyphens, values, namespace, strict); err != nil { t.Error(err) }