dont open stdin by default #15
Merged
Conversation
ah, this causes errors like this:
|
maybe another way to do it that is less unixy but more practical would be to have an opt-out flag rather than an opt-in |
@maxogden sorry. I can't follow you why checking whether there is a tty on stdin is a bad idea? If you don't pipe anything into your program like
will be
|
@greenify the problem is that var proc = require('child_process')
var child = proc.spawn('bionode') Will open stdin which IMO is a bit magical. |
Ah I see. How about using the "node way"?
|
@greenify that could probably work for our node use case but you still have this problem if someone uses bionode inside a bash script or similar that isn't running as a tty. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
this makes a breaking change I think
me and @mafintosh were trying to figure out why this was hanging:
and it was because of how bionode was always doing
process.stdin.pipe(cli.stdin)
.the more unixy way to do it would be to require a
-
as the last argument, which is what this implements, so now if you want bionode to read from stdin you can do:otherwise it won't open stdin