If your code is run at the shell, then I believe using { stdio: 'inherit'}
would fix it:
var git = spawn('git', ['submodule', 'add',
'git://github.com/PathTo/Submodule.git', 'submodule'],
{ stdio: 'inherit' });
Explanation: through tests in a bash shell I've found that if git thinks it is not communicating with a tty, it does not output any progress information. If your software is run from the shell and your tell spawn
to just pass stdin
, stdout
, and stderr
to the child process, then the child should see a tty and output progress information.