prefix-dev / rattler-build

rattler-build is a universal package builder for Windows, macOS and Linux
https://prefix-dev.github.io/rattler-build
BSD 3-Clause "New" or "Revised" License
185 stars 38 forks source link

Test scripts expressions are wrong evaluated #960

Open nichmor opened 2 months ago

nichmor commented 2 months ago

Having following in recipe.yaml:

tests:
  - requirements:
      run:
        - bzip2
    script:
      - if: unix
        then: 
          - test -f ${PREFIX}/fonts/Inconsolata-Regular.ttf
          - test -f ${PREFIX}/fonts/Inconsolata-Bold.ttf

will throw an error on windows: help: expected field ``script`` to be a list of commands until you add- echo 'hello'.

I think we need treat if:then as a list in this case or treat it as an empty list