From 09b279b7bc02c5aeec3fc5e75732b338f92a3921 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 11 Mar 2020 21:27:18 +0000 Subject: turn on colour by default ...when stdout+stderr connected to a tty (as opposed for example to being piped to a log file) very helpful to have colour such that the red/yellow of errors/warnings can draw the eye to problems. Gbp-Dch: Short --- functions/defaults.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index 695195d9d..108a9d96e 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -296,8 +296,12 @@ Set_config_defaults () esac # Setting live build options + if [ -t 1 ] && [ -t 2 ]; then + _COLOR="${_COLOR:-true}" + else + _COLOR="${_COLOR:-false}" + fi _BREAKPOINTS="${_BREAKPOINTS:-false}" - _COLOR="${_COLOR:-false}" _DEBUG="${_DEBUG:-false}" _FORCE="${_FORCE:-false}" _QUIET="${_QUIET:-false}" -- cgit v1.2.3