fix(helm): fail when helm deps are not fetched

This changes the behavior of the bulk downloader to fail as soon as it
encounters a dependency that it cannot fetch.

Closes #1439
pull/1466/head
Matt Butcher 8 years ago
parent 5ea81b47b1
commit 5dfbf7e3cb
No known key found for this signature in database
GPG Key ID: DCD5F5E5EF32C345

@ -194,15 +194,15 @@ func (m *Manager) downloadAll(deps []*chartutil.Dependency) error {
for _, dep := range deps { for _, dep := range deps {
fmt.Fprintf(m.Out, "Downloading %s from repo %s\n", dep.Name, dep.Repository) fmt.Fprintf(m.Out, "Downloading %s from repo %s\n", dep.Name, dep.Repository)
// Any failure to resolve/download a chart should fail:
// https://github.com/kubernetes/helm/issues/1439
churl, err := findChartURL(dep.Name, dep.Version, dep.Repository, repos) churl, err := findChartURL(dep.Name, dep.Version, dep.Repository, repos)
if err != nil { if err != nil {
fmt.Fprintf(m.Out, "WARNING: %s (skipped)", err) return fmt.Errorf("could not find %s: %s", churl, err)
continue
} }
if _, _, err := dl.DownloadTo(churl, "", destPath); err != nil { if _, _, err := dl.DownloadTo(churl, "", destPath); err != nil {
fmt.Fprintf(m.Out, "WARNING: Could not download %s: %s (skipped)", churl, err) return fmt.Errorf("could not download %s: %s", churl, err)
continue
} }
} }
return nil return nil

Loading…
Cancel
Save