Skip to content

Commit 7462e1c

Browse files
authored
Merge pull request #148 from replicatedhq/equality
Fix equality in regex analyzer
2 parents 2158dee + 6563290 commit 7462e1c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/analyze/text_analyze.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ func compareRegex(conditional string, foundMatches map[string]string) (bool, err
198198
case "==":
199199
fallthrough
200200
case "===":
201-
return lookForValueInt == foundValueInt, nil
201+
return foundValueInt == lookForValueInt, nil
202202

203203
case "<":
204-
return lookForValueInt < foundValueInt, nil
204+
return foundValueInt < lookForValueInt, nil
205205

206206
case ">":
207-
return lookForValueInt > foundValueInt, nil
207+
return foundValueInt > lookForValueInt, nil
208208

209209
case "<=":
210-
return lookForValueInt <= foundValueInt, nil
210+
return foundValueInt <= lookForValueInt, nil
211211

212212
case ">=":
213-
return lookForValueInt >= foundValueInt, nil
213+
return foundValueInt >= lookForValueInt, nil
214214
}
215215
} else {
216216
// all we can support is "=" and "==" and "===" for now

0 commit comments

Comments
 (0)