dhall-lang / setup-dhall

Github action to install a specific version of https://dhall-lang.org and run commands
BSD 3-Clause "New" or "Revised" License
15 stars 7 forks source link

setup-dhall fails with Cannot read properties of undefined (reading 'browser_download_url') #8

Open TristanCacqueray opened 9 months ago

TristanCacqueray commented 9 months ago

It seems like the action is broken by failing with:

Run dhall-lang/setup-dhall@v4
  with:
    version: latest
Fetching dhall releases from https://api.github.com/repos/dhall-lang/dhall-haskell/releases/latest
/home/runner/work/_actions/dhall-lang/setup-dhall/v4/src/action.js:61
    core: coreRelease.browser_download_url,
                      ^

TypeError: Cannot read properties of undefined (reading 'browser_download_url')
    at fetchReleases (/home/runner/work/_actions/dhall-lang/setup-dhall/v4/src/action.js:61:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/dhall-lang/setup-dhall/v4/src/action.js:104:16)

Example run: https://github.com/change-metrics/demo-node-config/actions/runs/7453463971/job/20278886176?pr=8

thoughtpolice commented 7 months ago

For anyone running into this, the problem is that Dhall 1.42.1 has no release assets, so the attempt to download the assets in the action fails. You can fix this by specifying:

      - uses: dhall-lang/setup-dhall@v4
        with:
          version: '1.42.0'

to work around it

craig-day commented 6 months ago

Thanks for the workaround @thoughtpolice, looks like this is blocked until https://github.com/dhall-lang/dhall-haskell/issues/2564 is resolved.