I've got Fabric set up to git fetch
on a remote machine. It works fine, but there's a new line printed to stdout
for every percentage progress that Git prints:
[host] out: remote: Compressing objects: 1% (3/252)
[host] out: remote: Compressing objects: 2% (6/252)
[host] out: remote: Compressing objects: 3% (8/252)
[host] out: remote: Compressing objects: 4% (11/252)
[host] out: remote: Compressing objects: 5% (13/252)
[host] out: remote: Compressing objects: 6% (16/252)
[host] out: remote: Compressing objects: 7% (18/252)
[host] out: remote: Compressing objects: 8% (21/252)
[host] out: remote: Compressing objects: 9% (23/252)
...
[host] out: Resolving deltas: 0% (0/72)
[host] out: Resolving deltas: 12% (9/72)
[host] out: Resolving deltas: 15% (11/72)
[host] out: Resolving deltas: 18% (13/72)
[host] out: Resolving deltas: 22% (16/72)
[host] out: Resolving deltas: 23% (17/72)
[host] out: Resolving deltas: 55% (40/72)
How can I prevent this from happening?
Try this:
run('git fetch', pty=False)
What I usually do is this if I don't care to see the output of the command:
with hide('stdout'):
run('git fetch')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With