Handle errors in release walking
@@ -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
