'inherit' rather than 'pipe' stdio streams #36
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit is intended to be a report and a suggestion, I'm not versed about this utility neither about your plans on improving it.
I've found useful to run the child giving it direct access to parent's stdio streams (through 'inherit') rather than piping them.
I was developing an interactive command line utility that makes use of
process.stdin.setRawMode
so I needed access to the tty stream in the child.With this little change
runjs
runs perfectly as expected. My cli thinks it's executed directly on a terminal, and each time a file is modified the cli is restarted.With the bind to 'exit' event, when the cli process finishes the runjs process finishes too, so there's no need of killing it manually with
Ctrl^C
.Congratulations for this tool and its clean code, a quick read allowed me to know where I had to type.
Cheers
L.