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.
This commit is contained in:
0x5c 2023-02-19 22:02:40 -05:00 committed by classabbyamp
parent 944ab17b06
commit a5a7821a67
1 changed files with 13 additions and 3 deletions

View File

@ -176,8 +176,13 @@ msg_warn_nochroot() {
msg_normal() { msg_normal() {
if [ -z "$XBPS_QUIET" ]; then if [ -z "$XBPS_QUIET" ]; then
# normal messages in bold # normal messages in bright bold white
[ -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 "=> $@" printf "=> $@"
[ -n "$NOCOLORS" ] || printf "\033[m" [ -n "$NOCOLORS" ] || printf "\033[m"
fi fi
@ -201,7 +206,12 @@ report_broken() {
} }
msg_normal_append() { 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 "$@" printf "$@"
[ -n "$NOCOLORS" ] || printf "\033[m" [ -n "$NOCOLORS" ] || printf "\033[m"
} }