diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-04-01 09:26:05 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-04-01 09:26:05 -0700 |
commit | 0ec9ef23e59646583487be53afb53cceb50ab581 (patch) | |
tree | b5d42e24ac621b2302d1e692a11e71a31b581400 /bin/egencache | |
parent | egencache,emirrordist: disable color if no tty (diff) | |
download | portage-0ec9ef23e59646583487be53afb53cceb50ab581.tar.gz portage-0ec9ef23e59646583487be53afb53cceb50ab581.tar.bz2 portage-0ec9ef23e59646583487be53afb53cceb50ab581.zip |
egencache,emirrordist: export NOCOLOR if no tty
Diffstat (limited to 'bin/egencache')
-rwxr-xr-x | bin/egencache | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/egencache b/bin/egencache index cbc4b28ad..59d5c3bd7 100755 --- a/bin/egencache +++ b/bin/egencache @@ -845,17 +845,18 @@ class GenChangeLogs(object): def egencache_main(args): + # The calling environment is ignored, so the program is + # completely controlled by commandline arguments. + env = {} + if not sys.stdout.isatty(): portage.output.nocolor() + env['NOCOLOR'] = 'true' parser, options, atoms = parse_args(args) config_root = options.config_root - # The calling environment is ignored, so the program is - # completely controlled by commandline arguments. - env = {} - if options.repo is None: env['PORTDIR_OVERLAY'] = '' elif options.portdir_overlay: |