From 70820bf71c49e7919e0f725450bb55eb9ffd5bac Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 29 May 2026 14:37:51 -0700 Subject: [PATCH] pkg/manifests: fix dropped walk errors Signed-off-by: Lars Lehtonen --- pkg/manifests/bundleloader.go | 3 +++ pkg/manifests/packagemanifestloader.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pkg/manifests/bundleloader.go b/pkg/manifests/bundleloader.go index f557c4f35..34ce20762 100644 --- a/pkg/manifests/bundleloader.go +++ b/pkg/manifests/bundleloader.go @@ -122,6 +122,9 @@ func collectWalkErrs(walk filepath.WalkFunc, errs *[]error) filepath.WalkFunc { } func (b *bundleLoader) LoadBundleWalkFunc(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } if f == nil { return fmt.Errorf("invalid file: %v", f) } diff --git a/pkg/manifests/packagemanifestloader.go b/pkg/manifests/packagemanifestloader.go index d3597a97d..37185e1e2 100644 --- a/pkg/manifests/packagemanifestloader.go +++ b/pkg/manifests/packagemanifestloader.go @@ -42,6 +42,9 @@ func (p *packageManifestLoader) LoadPackage() error { // LoadPackagesWalkFunc attempts to unmarshal the file at the given path into a PackageManifest resource. // If unmarshaling is successful, the PackageManifest is added to the loader's store. func (p *packageManifestLoader) LoadPackagesWalkFunc(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } if f == nil { return fmt.Errorf("invalid file: %v", f) } @@ -85,6 +88,9 @@ func (p *packageManifestLoader) LoadPackagesWalkFunc(path string, f os.FileInfo, } func (p *packageManifestLoader) LoadBundleWalkFunc(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } if f == nil { return fmt.Errorf("invalid file: %v", f) }