-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cover output of spawned processes that inherit stdio #9
Comments
I would like this too, but I don't think it's possible. From what I can remember, the stdio inheriting logic is done in native code in libuv, not in |
@sindresorhus I investigated it and indeed it looks there's no way. Still I would leave it open, maybe other adventurers will find some miraculous solution. |
Sure |
As a passer-by who hit this issue, I don't know if future folks have the same kind of problems as me (I wanted guarantees that I was getting pretty much the exact stdout/stderr with ASNI, but not spamming the console.) What I did instead was use node-pty to spawn an in-memory pseudo-terminal which I could extract pretty much the exact same stdout/stderr. |
@orta Yup. That works, but |
It might be nice to somehow support that, at least via option.
Without that, output that hook-std captures doesn't necessary cover all output as seen from initialized process in a console.
I think it's possible only via overriding
ChildProcess.prototype.spawn
and act accordingly after recognizing the intention.The text was updated successfully, but these errors were encountered: