Skip to content

Commit

Permalink
do not omit error in find files
Browse files Browse the repository at this point in the history
  • Loading branch information
nvanthao committed Mar 5, 2024
1 parent 2e11a65 commit 64c8b1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/analyze/velero.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 64c8b1a

Please sign in to comment.