diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-11 21:27:18 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-03-16 13:32:16 +0000 |
commit | 09b279b7bc02c5aeec3fc5e75732b338f92a3921 (patch) | |
tree | 223fe0db9d088218287848e6547187300afd08dd /functions/defaults.sh | |
parent | 49e68da5ee11a1e9dd7a6dfe1bcfcb8a0d21fe42 (diff) | |
download | vyos-live-build-09b279b7bc02c5aeec3fc5e75732b338f92a3921.tar.gz vyos-live-build-09b279b7bc02c5aeec3fc5e75732b338f92a3921.zip |
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
Diffstat (limited to 'functions/defaults.sh')
-rwxr-xr-x | functions/defaults.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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}" |