For clarify purposes I want to see the exact command Node.js runs versus the shell/cli. Unfortunately I can't seem to find out how...
https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options
The returned object from this is an event emitter, but there's no way to sniff events from an event emitter in Nodejs at this time. I've tried data
&, pipe
events with no success.
The object returned with child_process.spawn
has sub-objects: stdout
, stdin
, stderr
. There's exmaples of stderr
and stdout
being used as event emitters & these work fine, but I can't find the events emitted by stdin
...
I know I can just take my input and format it, but this feels prone to failure/inconsistency so I would much rather find a way to sniff what it is actually using.