From 411cf6e54aa962816d306fcdbc2d899755032f76 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Mon, 13 Jun 2016 13:46:04 -0600 Subject: [PATCH] fix(helm): produce error if package name is inconsistent 'helm package' now produces an error if the directory name and the name in Chart.yaml are not the same. --- cmd/helm/package.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/helm/package.go b/cmd/helm/package.go index acf0c5e55..db3ca7816 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -54,6 +54,10 @@ func runPackage(cmd *cobra.Command, args []string) error { return err } + if filepath.Base(path) != ch.Metadata.Name { + return fmt.Errorf("directory name (%s) and Chart.yaml name (%s) must match.", filepath.Base(path), ch.Metadata.Name) + } + // Save to the current working directory. cwd, err := os.Getwd() if err != nil {