From a5a7821a67b9073f7f5c7449842e5fa3faba1949 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Sun, 19 Feb 2023 22:02:40 -0500 Subject: [PATCH] common/xbps-src/shutils/common.sh: ensure white text in msg_normal Most terminals see '1m' as being a "bright colour" modifier, but others consider it to be the "bold font" modifier, like the GitHub Actions log. '97m' is a standalone "bright white" that is supported in most terminals, including GitHub Actions, and is ignored where not supported. --- common/xbps-src/shutils/common.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 04247942dec..4083e08ee08 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -176,8 +176,13 @@ msg_warn_nochroot() { msg_normal() { if [ -z "$XBPS_QUIET" ]; then - # normal messages in bold - [ -n "$NOCOLORS" ] || printf "\033[1m" + # normal messages in bright bold white + if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then + # Github CI considers '1m' to be just a font bold + [ -n "$NOCOLORS" ] || printf "\033[97m\033[1m" + else + [ -n "$NOCOLORS" ] || printf "\033[1m" + fi printf "=> $@" [ -n "$NOCOLORS" ] || printf "\033[m" fi @@ -201,7 +206,12 @@ report_broken() { } msg_normal_append() { - [ -n "$NOCOLORS" ] || printf "\033[1m" + if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then + # Github CI considers '1m' to be just a font bold + [ -n "$NOCOLORS" ] || printf "\033[97m\033[1m" + else + [ -n "$NOCOLORS" ] || printf "\033[1m" + fi printf "$@" [ -n "$NOCOLORS" ] || printf "\033[m" }