[fix]: include filename in the error returned by generate-csv command
Currently, if there is error during unmarshalling of crds in the
deploy/crds folder, the error returned by generate-csv command
is unclear as it does not include any filename. This PR modifies
the error message to include the filepath.
@@ -199,7 +199,7 @@ func writeCRDsToDir(crdPaths []string, toDir string) error {
}
typeMeta, err := k8sutil.GetTypeMetaFromBytes(b)
if err != nil {
- return err
+ return fmt.Errorf("error in %s : %v", p, err)
}
if typeMeta.Kind != "CustomResourceDefinition" {
continue
