Merge pull request #1486 from poopoothegorilla/fix/add-chart-dir-err

fix(pkg/chartutil): add error if chart yaml not in directory
pull/1483/merge
Matt Butcher 8 years ago committed by GitHub
commit eb3624a53a

@ -87,6 +87,10 @@ func LoadArchive(in io.Reader) (*chart.Chart, error) {
parts := strings.Split(hd.Name, "/") parts := strings.Split(hd.Name, "/")
n := strings.Join(parts[1:], "/") 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 { if _, err := io.Copy(b, tr); err != nil {
return &chart.Chart{}, err return &chart.Chart{}, err
} }

Loading…
Cancel
Save