fix(chartutil): improve 'missing name' error

pull/1721/head
Euan Kemp 8 years ago committed by Euan Kemp
parent b3d812b346
commit 25f74989a5

@ -151,9 +151,12 @@ func loadFiles(files []*afile) (*chart.Chart, error) {
} }
// Ensure that we got a Chart.yaml file // Ensure that we got a Chart.yaml file
if c.Metadata == nil || c.Metadata.Name == "" { if c.Metadata == nil {
return c, errors.New("chart metadata (Chart.yaml) missing") return c, errors.New("chart metadata (Chart.yaml) missing")
} }
if c.Metadata.Name == "" {
return c, errors.New("invalid chart (Chart.yaml): name must not be empty")
}
for n, files := range subcharts { for n, files := range subcharts {
var sc *chart.Chart var sc *chart.Chart

Loading…
Cancel
Save