Skip to content

Invalid precedence of `if/variables:` condition when using `rules/only/except:`

Summary

There's invalid precedence implementation today when using rules/only/except with if/variables:

rules:
  if: $VAR1 == "a" || $VAR2 == "b" && $VAR3 == "c" || $VAR4 == "d" && $VAR5 == "e"

The above condition is evaluated as:

$VAR1 == "a" || ($VAR2 == "b" && ($VAR3 == "c" || ($VAR4 == "d" && $VAR5 == "e")))`

Where it should be as:

($VAR1 == "a" || ($VAR2 == "b" && $VAR3 == "c")) || ($VAR4 == "d" && $VAR5 == "e")`
Edited by Kamil Trzciński