You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using duplexify to create a duplex stream out of a child process. This enables me to create complex pipelines, combining processes with other streams. So, I wrote a simple function that wraps duplexify and child_process.spawn as follows:
Now I can use the stream returned by run with stream.pipeline. The only issue that I have with this solution is that I would like run to wait for the child processes' exit status, and if it is not zero, forward an error to the duplex stream. I tried to address this by adding a final method as follows:
I am using
duplexify
to create a duplex stream out of a child process. This enables me to create complex pipelines, combining processes with other streams. So, I wrote a simple function that wrapsduplexify
andchild_process.spawn
as follows:Now I can use the stream returned by
run
withstream.pipeline
. The only issue that I have with this solution is that I would likerun
to wait for the child processes' exit status, and if it is not zero, forward an error to the duplex stream. I tried to address this by adding afinal
method as follows:but the
final
function never gets called byduplexify
. Is there a way to solve this issue withduplexify
?The text was updated successfully, but these errors were encountered: