Skip to content

Commit 30a5c6c

Browse files
alongustechnosophos
authored andcommitted
Fix a bug causing 'helm depndency update' to delete required charts
1 parent ebbf1b0 commit 30a5c6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/downloader/manager.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,15 @@ func (m *Manager) downloadAll(deps []*chartutil.Dependency) error {
216216
return fmt.Errorf("%q is not a directory", destPath)
217217
}
218218

219-
fmt.Fprintf(m.Out, "Saving %d charts\n", len(deps))
219+
fmt.Fprintln(m.Out, "Deleting outdated charts")
220220
for _, dep := range deps {
221221
if err := m.safeDeleteDep(dep.Name, destPath); err != nil {
222222
return err
223223
}
224+
}
224225

226+
fmt.Fprintf(m.Out, "Saving %d charts\n", len(deps))
227+
for _, dep := range deps {
225228
if strings.HasPrefix(dep.Repository, "file://") {
226229
if m.Debug {
227230
fmt.Fprintf(m.Out, "Archiving %s from repo %s\n", dep.Name, dep.Repository)

0 commit comments

Comments
 (0)