Automatically disable progress for non tty output, i.e. when it's redirected.

Otherwise, a VT100 terminal will soon be assumed.

TEST=touch foo.txt; gclient sync >> foo.txt &; tail -F foo.txt doesn't show progress.
BUG=none

Review URL: http://codereview.chromium.org/3310026

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59101 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent acc4567100
commit 5b3f8851ef

@ -715,7 +715,8 @@ solutions = [
raise gclient_utils.Error('No solution specified')
revision_overrides = self._EnforceRevisions()
pm = None
if command == 'update' and not self._options.verbose:
# Disable progress for non-tty stdout.
if command in ('update', 'revert') and sys.stdout.isatty():
pm = Progress('Syncing projects', 1)
work_queue = gclient_utils.ExecutionQueue(self._options.jobs, pm)
for s in self.dependencies:

Loading…
Cancel
Save