microsoft / azure-vhd-utils

Azure VHD utilities.
Other
96 stars 41 forks source link

Detect lack of TTY and output summary lines instead of rewriting line #17

Open colemickens opened 8 years ago

colemickens commented 8 years ago

I'm using this inside of Jenkins jobs. When it calculates the checksum and does the upload, it replaces the progress line in place. This doesn't really work without a TTY though, and it winds up spewing a bunch of status lines, all in one line, when the step is finished

For example, the timestamps in bold are when Jenkins gets the line of output. A delay, and then all of the progress lines at once.

It might be preferable if you could detect the lack of TTY and just output new lines instead of replacing the existing line.

This would just be a nicety though, it doesn't impact the usability or functionality at all. Thanks again for this tool, too!