To clarify the goals, I want to see that the exact Node.js command works against the / cli shell. Unfortunately, I canβt understand how ...
https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options
The returned object from this object is an event emitter, but there is currently no way to sniff events from an event emitter in Nodejs. I tried the data &, pipe events without success.
The object returned using child_process.spawn has sub-objects: stdout , stdin , stderr . There, exmaples stderr and stdout are used as event emitters, and they work fine, but I cannot find the events emitted by stdin ...
I know that I can just take my input and format it, but it seems like a failure / inconsistency, so I would rather find a way to smell what I actually use.
source share