Skip to content

Commit

Permalink
fix: ensure HumioVersion constaint parses successfully
Browse files Browse the repository at this point in the history
Fixes #747
  • Loading branch information
tankbusta committed Oct 18, 2023
1 parent c67d431 commit 195b7ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/humiocluster_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func (hv *HumioVersion) IsLatest() bool {

func (hv *HumioVersion) constraint(constraintStr string) (bool, error) {
constraint, err := semver.NewConstraint(constraintStr)
return constraint.Check(hv.version), err
if err != nil {
return false, fmt.Errorf("could not parse constraint of `%s`: %w", constraintStr, err)
}

return constraint.Check(hv.version), nil
}

func (hv *HumioVersion) String() string {
Expand Down

0 comments on commit 195b7ee

Please sign in to comment.