Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
This issue, related to #7666 and #7669, exits with status code 0 when the exit handler npm error occurs. Exiting with status code 0 allows the ci to continue to the next steps.
Expected Behavior
I would expect it to exit with status code 1 since it is an error. That way ci would fail when this error occurs.
Steps To Reproduce
The GitHub Actions workflow showing this behaviour can be found at: https://github.com/Sebastian-Webster/npm-reproducible-example/actions/runs/10007253675
The repository code for that workflow can be found here at: https://github.com/Sebastian-Webster/npm-reproducible-example/tree/22.5.0
This example shows that the issue does not happen in Node 22.4.1, but does in 22.5.0.
Environment
- npm: v10.8.2
- Node.js: v22.5.0
- OS Name: Windows 2019 & 2022, macOS 12, 13, & 14, and Ubuntu 20.04 & Ubuntu 22.04
- System Model Name: GitHub Actions