Skip to content

Commit

Permalink
Catch whitespace csv.spec.provider.name values (#272)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
  • Loading branch information
komish committed Jan 10, 2024
1 parent 0d032b9 commit e6998ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/validation/internal/operatorhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func checkSpecMaintainers(checks CSVChecks) CSVChecks {

// checkSpecProviderName will validate the values informed via csv.Spec.Provider.Name
func checkSpecProviderName(checks CSVChecks) CSVChecks {
if checks.csv.Spec.Provider.Name == "" {
if strings.TrimSpace(checks.csv.Spec.Provider.Name) == "" {
checks.errs = append(checks.errs, fmt.Errorf("csv.Spec.Provider.Name not specified"))
}
return checks
Expand Down

0 comments on commit e6998ff

Please sign in to comment.