fix(pkg/chartutil): add error if chart yaml not in directory

For archived files the Chart.yaml file should be contained in a base
directory. This commit adds an error when the Chart.yaml file is found
in the root directory.

Fixes #1171
pull/1486/head
Jim 9 years ago
parent 534f0df907
commit 7a054e0e6b

@ -87,6 +87,10 @@ func LoadArchive(in io.Reader) (*chart.Chart, error) {
parts := strings.Split(hd.Name, "/")
n := strings.Join(parts[1:], "/")
if parts[0] == "Chart.yaml" {
return nil, errors.New("chart yaml not in base directory")
}
if _, err := io.Copy(b, tr); err != nil {
return &chart.Chart{}, err
}

Loading…
Cancel
Save