I'm just trying to run git clone
from node and stream the output into stdout just like running from shell normally would, but after using child_process.spawn
, I can't get the output to pipe into stdout. Currently I'm using:
child = spawn('git', ['clone', url]);
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
But I only see "Cloning into 'directory'" message and not the remote messages and "Receiving objects...".
What am I doing wrong?