From 64c8b1a58df9127ed2f247b35bf3779b7c970cf9 Mon Sep 17 00:00:00 2001 From: Gerard Nguyen Date: Tue, 5 Mar 2024 21:53:52 +1100 Subject: [PATCH] do not omit error in find files --- pkg/analyze/velero.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/analyze/velero.go b/pkg/analyze/velero.go index 36ee988be..6be5327b4 100644 --- a/pkg/analyze/velero.go +++ b/pkg/analyze/velero.go @@ -653,7 +653,10 @@ func getVeleroVersion(excludedFiles []string, findFiles getChildCollectedFileCon veleroDeploymentDir := "cluster-resources/deployments" veleroVersion := "" veleroDeploymentGlob := filepath.Join(veleroDeploymentDir, "velero.json") - veleroDeploymentJson, _ := findFiles(veleroDeploymentGlob, excludedFiles) + veleroDeploymentJson, err := findFiles(veleroDeploymentGlob, excludedFiles) + if err != nil { + return "", errors.Wrapf(err, "failed to find Velero deployment") + } if len(veleroDeploymentJson) == 0 { return "", errors.Errorf("could not find Velero deployment in %s", veleroDeploymentDir) }