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
Help stops before finishing to write in Node v6.1.0 #497
Comments
hey @bcoe thanks for your quick reply, Node v6 has done several updates to Buffer, worth looking into it |
Posting this here for reference: nodejs/node#6456. |
The problem often arises when looping over |
@nicola @eljefedelrodeodeljefe I've been chatting with @othiym23, and have a plan of action for a hacky patch; @nicola could you submit a failing test case in |
Just to throw in some: I assume it's about the recursive call of parseArgs and the process.exit(0) here. At best the hotfix is revertable in the future though. The private process APIs are likely to change and are a terrible hack - if you consider them. |
I have tried replacing all the process.exit() with ee.on('custom_exit', function () {
// no-op
}) and a respective |
Exploring this here #498 |
@eljefedelrodeodeljefe would |
hmm. Can you think of a test case? When I see this right node core defer most events to the nextTick. In this case I would suppose it wouldn't matter because when you return from top scope and there is still something on the event loop that will execute. But, tbh, I am not sure. |
* test: add failing test for #497 * fix: created shim that sets stdout/stderr to blocking when we know we're about to exit * fix: OSX tests need a bit more running time * fix: for the sake of Browserify, also check for _handle * chore: pulled setBlocking shim into its own module
@nicola please give this a spin:
I've written this shim: https://github.com/yargs/set-blocking |
@nicola bump; somewhat worried about this change, so would love to have the second set of eyes before it gets promoted to |
@nicola this should now be fixed on |
edit: all great it works! thank you so much for the quick fix! |
@nicola awesome, I can close this out? |
Here is my little command:
All correct, but when I use the flag
--help
, it breaks:This is the same problem facing tj/commander.js#530 right now,
do you have a fix for this planned?
The text was updated successfully, but these errors were encountered: