jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

Fix handling of 'unhandledRejection' event #377

Closed krausvo1 closed 4 years ago

krausvo1 commented 4 years ago

I have stumbled upon this error:

TypeError: Cannot read property 'handleErr' of undefined at process.addListener (/usr/local/lib/node_modules/jake/lib/program.js:228:22) at process.emit (events.js:197:13) at processPromiseRejections (internal/process/promises.js:139:20) at processTicksAndRejections (internal/process/next_tick.js:82:32)

I believe it was caused by this change, the fix seems to be straightforward.

kibertoad commented 4 years ago

Thanks! Could you add test for this case?

kibertoad commented 4 years ago

Thank you so much!

krausvo1 commented 4 years ago

Glad I could help :slightly_smiling_face: thanks for keeping jake updated!