sudoblockio / tackle

Tackle is a programmable configuration language for building modular utilities, code generators, and CLIs with schema validation baked in.
Apache License 2.0
52 stars 2 forks source link

`if` can't be used with when #216

Open robcxyz opened 9 months ago

robcxyz commented 9 months ago

Per title

expanded->:
  for:
    - foo
    - bar
  when: true
  if: item=='foo'
  do->: var item

Fails

def test_parser_conditionals_when_if():
    """Check `when` key is true with an `if` and loop."""
    output = tackle('when-if.yaml')

    assert len(output['expanded']) == 1

Length is 2... - if condition skipped