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
Add pipeStdin()
method
#534
Comments
Maybe: await execa('cat').pipeToStdinFrom('stdin.txt') |
Yes, I was also thinking users might not realize things are done from a reverse direction than I'm going to take up this PR right now. 🧑🏭 |
I implemented it in #535. Doing so gave me some additional insights in terms of overall experience as I wrote tests and documentation for it. And now, it feels to me like this method is not as useful as
So Based on this, I do not think it is worth the additional complexity introduced to the API. On the other hand, we could improve the documentation to highlight the above patterns, so I opened #536 for this. |
I agree with your assessment. |
Do you think a |
Yes, I agree it would. Naming-wise, would |
|
Done in #542. |
#531 added
pipeStdout()
,pipeStderr()
andpipeAll()
to redirect a child process'sstdout
/stderr
to another process, a stream or a file.For completeness and convenience, we should add a similar
pipeStdin()
which would redirect another processstdout
, stream or file to a child processstdin
.This pattern is currently already documented in our Tips section.
This would simplify it to:
The text was updated successfully, but these errors were encountered: