Skip to content

Commit

Permalink
Merge pull request #148 from replicatedhq/equality
Browse files Browse the repository at this point in the history
Fix equality in regex analyzer
  • Loading branch information
marccampbell committed Mar 7, 2020
2 parents 2158dee + 6563290 commit 7462e1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/analyze/text_analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,19 @@ func compareRegex(conditional string, foundMatches map[string]string) (bool, err
case "==":
fallthrough
case "===":
return lookForValueInt == foundValueInt, nil
return foundValueInt == lookForValueInt, nil

case "<":
return lookForValueInt < foundValueInt, nil
return foundValueInt < lookForValueInt, nil

case ">":
return lookForValueInt > foundValueInt, nil
return foundValueInt > lookForValueInt, nil

case "<=":
return lookForValueInt <= foundValueInt, nil
return foundValueInt <= lookForValueInt, nil

case ">=":
return lookForValueInt >= foundValueInt, nil
return foundValueInt >= lookForValueInt, nil
}
} else {
// all we can support is "=" and "==" and "===" for now
Expand Down

0 comments on commit 7462e1c

Please sign in to comment.