From e66c29261a8b8db6214ddebdc727e7b247be74df Mon Sep 17 00:00:00 2001 From: frob Date: Tue, 19 Nov 2024 17:33:52 +0100 Subject: [PATCH] Better error suppresion when getting terminal colours (#7739) Co-authored-by: Richard Lyons --- scripts/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 850800a0..bc7b5f58 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,8 +4,8 @@ set -eu -red="$( (/usr/bin/tput bold; /usr/bin/tput setaf 1; :) 2>&-)" -plain="$( (/usr/bin/tput sgr0; :) 2>&-)" +red="$( (/usr/bin/tput bold || :; /usr/bin/tput setaf 1 || :) 2>&-)" +plain="$( (/usr/bin/tput sgr0 || :) 2>&-)" status() { echo ">>> $*" >&2; } error() { echo "${red}ERROR:${plain} $*"; exit 1; }