metacall / distributable-macos

MacOs redistributable for shipping MetaCall Core.
Apache License 2.0
1 stars 6 forks source link

NodeJS failing with unhandled rejection #22

Closed viferga closed 2 months ago

viferga commented 3 months ago

https://github.com/metacall/distributable-macos/actions/runs/10184428467/job/28171741488?pr=21

./test.sh
  shell: /bin/bash -e {0}
+ echo 'Python Tests'
Python Tests
+ echo 'Running Python Reverse Words Test'
Running Python Reverse Words Test
+ echo 'load py tests/python/test.py\ninspect\ncall reverse_words("hello world")\nexit'
+ metacall
+ grep 'dlrow olleh'
node:internal/process/promises:[3](https://github.com/metacall/distributable-macos/actions/runs/10184428467/job/28171741488#step:5:3)89
      new UnhandledPromiseRejection(reason);
      ^

UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
    at throwUnhandledRejectionsMode (node:internal/process/promises:389:7)
    at processPromiseRejections (node:internal/process/promises:[4](https://github.com/metacall/distributable-macos/actions/runs/10184428467/job/28171741488#step:5:5)70:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32) {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v20.1[5](https://github.com/metacall/distributable-macos/actions/runs/10184428467/job/28171741488#step:5:6).1

Changing bash to shell mitigates the issue.