Skip to content

Commit

Permalink
Handle errors in release walking (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc authored and balopat committed Dec 4, 2018
1 parent 58ea582 commit eae1904
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/skaffold/deploy/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@ func (h *HelmDeployer) Dependencies() ([]string, error) {
for _, release := range h.Releases {
deps = append(deps, release.ValuesFiles...)
chartDepsDir := filepath.Join(release.ChartPath, "charts")
filepath.Walk(release.ChartPath, func(path string, info os.FileInfo, err error) error {
err := filepath.Walk(release.ChartPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
return errors.Wrapf(err, "failure accessing path '%s'", path)
}
if !info.IsDir() && !strings.HasPrefix(path, chartDepsDir) {
deps = append(deps, path)
}
return nil
})
if err != nil {
return deps, errors.Wrap(err, "issue walking releases")
}
}
sort.Strings(deps)
return deps, nil
Expand Down

0 comments on commit eae1904

Please sign in to comment.