broccolijs / broccoli

Browser compilation library – an asset pipeline for applications that run in the browser
https://broccoli.build
MIT License
3.33k stars 217 forks source link

[Fixes #388] ensure broccoli-cli exits with the appropriate status co… #456

Closed stefanpenner closed 3 years ago

stefanpenner commented 4 years ago

…de on build failure

peabnuts123 commented 4 years ago

Interesting. How does calling process.exit(1) mean the process exits with the wrong code? I frequently do this in my own code. What's the benefit of setting process.exitCode first?

stefanpenner commented 4 years ago

It doesn’t, process.exitCode just a more cooperative (IMHO better) way to exit with the status code of choice. Rather than explicitly ending the process, this approach allows the process to naturally shut down, ultimately exiting with w/e the final state of process.exitCode is.

This PR is fixing a bug, specifically the bug fix here was adding a missing exitCode assignment (see above inline comment)

peabnuts123 commented 4 years ago

Oh, I see! I had missed that there was an new exit scenario in there.

ryuran commented 3 years ago

Something new for this PR @stefanpenner @rwjblue ?

stefanpenner commented 3 years ago

released as v3.5.1 🎉