When I run git clone, as usual, I see the following:
$ git clone https://github.com/bensmithett/webpack-css-example
Cloning into 'webpack-css-example'...
remote: Counting objects: 179, done.
remote: Total 179 (delta 0), reused 0 (delta 0), pack-reused 179
Receiving objects: 100% (179/179), 24.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (79/79), done.
Checking connectivity... done
However, when I try to redirect this to a file, I only see this:
Cloning into 'webpack-css-example'...
Here is what I tried:
$ git clone https:
$ cat out.log
Cloning into 'sample-data'...
I tried it in Node.js and it does the same:
const fs = require('fs');
const child = spawn('git clone https://github.com/bensmithett/webpack-css-example');
child.stdout.on('data', function(data){
console.log(String(data));
});
child.stderr.on('data', function(data){
console.log(String(data));
});
Why are all tags remote:, etc. don't get into stdin / stderr? Is there a way to capture output? If not, what happens, what concludes that the output is displayed in the terminal, but it does not go through stdout or stderr?
source
share