-
Notifications
You must be signed in to change notification settings - Fork 81
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
bolt publish exit 0 despite npm error #179
Comments
Orly? I'll try to take a look today 👌 |
Ah okay. This is interesting, just thinking about the best way to resolve it. Bolt doesn't exit automatically because we handle the errors ourselves in an external script (publish will actually return a list of packages that were successfully published and a list of unsuccessful attempts). That behaviour is probably not super consistent (commands should really use logging and exit codes, functions should return data). We could either move the publish logic into an exposed function (similar to Option 2 is probably easier, but option 1 is more correct... |
I think we'll go with option 1. @bradleyayers how much of a blocker is this for you? You could work around it pretty easily in the meantime (take a look at our script for reference). If it's urgent though, I'm happy to look at it this week? |
Not a blocker for me, as it’s only happens when the NPM command fails, and that shouldn’t happen. It’s just a gotcha that I felt was worth raising so it can be fixed upstream. Thanks for looking into it! |
This is fixed in bolt 0.21.1!! Thanks to @lachlanhunt for the PR. |
Just an FYI, if you DO update to 0.21.1, be aware there was a minor breaking change, only if you were calling |
bolt publish
executesnpm publish
, but when npm returns non-zero exit code it does not cause bolt to exit non-zero. Examples where npm publish can fail are missing credentials, missing--access
, incompatible version of node.The text was updated successfully, but these errors were encountered: