Force consistent color output, in case we are capturing fetch
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 20:28:30 +0000 (20:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 20:28:30 +0000 (20:28 -0000)
output through a normal pipe due to unavailability of ptys.
Thanks to grobian for reporting.

svn path=/main/trunk/; revision=14530

pym/_emerge/EbuildFetcher.py

index 228d15bb2050bfef68533c31b09dd36c364a19bc..ba282081e39c285cfb475a6b49fff804bc1541dd 100644 (file)
@@ -66,6 +66,11 @@ class EbuildFetcher(SpawnProcess):
                if debug:
                        fetch_args.append("--debug")
 
+               if not self.background and nocolor not in ('yes', 'true'):
+                       # Force consistent color output, in case we are capturing fetch
+                       # output through a normal pipe due to unavailability of ptys.
+                       fetch_args.append('--color=y')
+
                self.args = fetch_args
                self.env = fetch_env
                SpawnProcess._start(self)