From 3cd74411000377bdbec441c198c207465e83fadf Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 22 Aug 2023 12:03:43 -0400 Subject: [PATCH] test: bring a little colour to Bash tests on GHA Signed-off-by: Jan Michalski --- src/test/unittest/unittest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/unittest/unittest.sh b/src/test/unittest/unittest.sh index 00cef128631..e5ab2c3ef48 100644 --- a/src/test/unittest/unittest.sh +++ b/src/test/unittest/unittest.sh @@ -72,7 +72,8 @@ function interactive_color() { fd=$2 shift 2 - if is_terminal ${fd} && command -v tput >/dev/null; then + if (is_terminal ${fd} || [ "$GITHUB_ACTIONS" == "true" ] ) && \ + command -v tput >/dev/null; then echo "$(tput setaf $color || :)$*$(tput sgr0 || :)" else echo "$*"