-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-zero exit codes for npm run-script build? #252
Comments
Doing some more digging, if I invoke the script directly, then I do get the exit code:
|
Should be reported to npm :) |
@vjeux thanks, sorry |
Oh I'm sorry, this is very educative, I had no idea that npm run didn't properly forward the return code. This is very unfortunate though and I don't think we can fix it :( |
Actually, I'm not sure this is npm's fault. The default
It looks like we're using the async version of If we use
|
Sorry about that, new PR: #256 |
Oh good catch! |
Thanks for the investigation and the quick fix! Correctly propagating error codes is hard! |
When I try to
npm run-script build
, if the process fails, I would expect it to return a non-zero exit code. Example:One of the reasons I want this is to utilize
npm run-script build
in a pre-commit hook as follows:The text was updated successfully, but these errors were encountered: