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) }