From abd0e20b596cdca66f38cd8515d954258afc36fa Mon Sep 17 00:00:00 2001 From: Tom Blauwendraat Date: Sat, 22 Jul 2023 10:53:58 +0200 Subject: [PATCH] [IMP] use no-color switch if available --- bin/autoaggregate | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/autoaggregate b/bin/autoaggregate index 5d3e09c7..8bbbc19f 100755 --- a/bin/autoaggregate +++ b/bin/autoaggregate @@ -5,7 +5,7 @@ import os import sys from dotenv import load_dotenv from multiprocessing import cpu_count -from subprocess import check_call +from subprocess import check_call, check_output import yaml from waftlib import ( @@ -46,6 +46,13 @@ def aggregate(config): old_umask = os.umask(int(UMASK)) cmd = [ "gitaggregate", + "-h", + ] + has_no_color_switch = b"no-color" in check_output(cmd) + cmd = ["gitaggregate"] + if has_no_color_switch: + cmd.append("--no-color") + cmd += [ "--expand-env", "--config", config,