Переглянути джерело

Better error suppresion when getting terminal colours (#7739)

Co-authored-by: Richard Lyons <frob@cloudstaff.com>
frob 5 місяців тому
батько
коміт
e66c29261a
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      scripts/install.sh

+ 2 - 2
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; }