-
-
Notifications
You must be signed in to change notification settings - Fork 283
Discard stdin by default #112
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
Conversation
|
I don't feel that |
|
Well, I don't see much difference between But generally I have no better idea than |
Would something along the line of |
|
I think |
You could add a manual test, like https://github.com/sindresorhus/ora/blob/master/example.js, so we can manually verify that it ignores Enter etc, and correctly resets stdin back to normal when being stopped. |
|
@sindresorhus added to |
Co-Authored-By: stroncium <[email protected]>
Co-Authored-By: stroncium <[email protected]>
|
Changed the name to |
|
@sindresorhus Shouldn't we set this behavior as default, by the way? There is almost no cases when people wouldn't wan't it to be this way, I imagine. |
👍 |
Add consumeStdin option, fixes #97
Though I have no idea how to write tests for it.
Plus, if some other library decides to something like what we do here, but won't be as careful as we are, things might get ugly. But that's mostly limitation of node's way of handling things.