-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Feat/exec stdio #48553
Feat/exec stdio #48553
Conversation
exec and execFile methods changes to accept stdio in its options as its corresponding sync methods. Tests added and docs updated
input option added to spawn, exec and execFile. tests and documentation updated Fixes: nodejs#45306 Fixes: nodejs#25231
There was a lot of disagreement in #25231 so... 🤷 |
@bnoordhuis most of the disagreement was around how this was going to be implemented. I think this could be a good opportunity to discuss the matter on an actual implementation option. I think this could help migrating sync code to async and that there aren't any downsides to having an extra option. |
I think people who are using the synchronous methods are using them for the synchronous behavior, not because of conveniences missing from the asynchronous versions. That means it's not generally going to be a simple find/replace to convert that kind of code. |
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.
Sorry, but Ben explained pretty well in #48786 (comment) why this isn't a great idea most likely.
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.
This PR attempts to add input and stdio options to child process async method who hadn't while its sync counterparts did.
spawn
only input andexec
andexecFile
both.Fixes #45306
Fixes #25231