-
Notifications
You must be signed in to change notification settings - Fork 147
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
fix: exit process on success to continue execution of other scripts #32
fix: exit process on success to continue execution of other scripts #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm fine with adding this, but I don't see what behavior this fixes, could you explain it a bit more? |
Sure @jfmengels! I noticed the problem when I was calling the What do you think? Is this a proper fix? Or is it something else I am missing? |
And adding this line of code fixes that? That sounds odd, as the command terminates (I assume with code 0), so that sounds more like a bug in that library, or something they should document how to deal with better. If you don't mind taking another look around (maybe play with calling really simple node.js executables etc) and see if this fix is really necessary. FYI, should this be actually necessary, then you'd need to add process.exit calls to other parts. These function calls will not call process.exit() at the moment unless an error is created somewhere. |
Thank you for the response and the recommendation @jfmengels! I tried the following commands. When I run this (and other similar git commands) spawn('git', ['log'])
.then((resp) => {
console.log('RESP', resp);
}); the spawn('./node_modules/.bin/all-contributors', [
'add', 'spirosikmd', 'code',
])
.then((resp) => {
console.log('RESP', resp);
}); the function onError(error) {
if (error) {
console.error(error.message);
process.exit(1);
}
console.log(process.exitCode);
} and it was actually |
Ok, this is odd but I'm fine with it. Thanks @spirosikmd :) |
Automatically released thanks to @kentcdodds' scripts 😄 |
No description provided.