Open roryabraham opened 3 months ago
Was looking into what it would take to implement this, and I managed to track down some stuff:
It looks like the LogicalOpNode structure is comprised of a LHS and a RHS. So I'd assume that ${{ condition && value-if-true || value-if-false }}
.
Need to continue to dig into how the AST is traversed and such. It looks like a custom AST was developed for this repo to represent GHA syntax? Pretty impressive stuff.
Problem
It's common to use this "false ternary" syntax in GitHub Actions:
However a note from their docs:
This mistake bit us when I foolishly added some code that looked like this:
not surprisingly, this led to unexpected behavior where the result was always
s3://staging-expensify-cash
.Solution
Update this repo to call out this careless mistake in expressions, since it is likely to lead to unexpected behavior.