-
-
Notifications
You must be signed in to change notification settings - Fork 227
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 buffered data to error.stdout
, error.stderr
and error.all
#271
Conversation
a35e73c
to
71096ef
Compare
CI tests fixed. Before moving forward with |
71096ef
to
7db09f0
Compare
Is this really useful? What would someone use it for?
We could potentially add this to |
I think once one stream fails, we don't want the other streams to keep going, i.e. we can close or destroy them right away. If we do this by emitting an |
👍
👍 |
7db09f0
to
6fecfca
Compare
Fixed. Summary of changes:
It turns out calling
This PR enables some little refactoring, but I will do it in a follow-up PR to keep the diff simple. No TypeScript types have been changed, but I've added documentation for the new buffered data behavior. |
d212408
to
5cf6b4e
Compare
a567ff0
to
0c41776
Compare
Fixed. |
error.stdout
, error.stderr
and error.all
Fixes #228. The issue was that errors on stdin/stdout/stderr were not reported the same way as other errors.
It also adds:
error.stdout
orerror.stderr
set with the buffered data when that stream failederror.stream
set with the name of the failing streamerror.message
on stream errorsIssues
If one stream errors, we do not want to wait for other streams to complete, for the same reason as #270, i.e. those streams might take a long time to complete (or never complete). However this creates the following issues:
get-stream
does not seem to allow to retrieve the currently buffered data.error.stream
will be set tot the first stream to report an error.all
will always fail right beforestdout
orstderr
, taking precedence over them.Possible solutions for each of those issues:
error
event on them. Not implemented yet.setImmediate()
) and check if other streams have failed. Not implemented yet.all
. This PR currently implements this.