diff options
author | Luke Deller <luke@deller.id.au> | 2018-07-05 22:52:49 +1000 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-26 11:27:06 +0200 |
commit | 094f9f48b227e9e9cb7218555cfbd8868d9646d7 (patch) | |
tree | 1f115590e2ecdd6d12f073d006a22e0f7353b2a2 | |
parent | f13c4f11a1cae639ae2bc6dc5d4930ec979b0f33 (diff) |
Avoid configure error when warning with no TERM
When configure wants to show a warning, it tries to check whether the
terminal supports colour. This check produces an error message
when running with no TERM environment variable set (seen on a tinderbox)
Fix this check so that it tolerates failure of the `tput colors` command
Change-Id: I263136142120cf66fe900df0deb74d2fa6e5d1d0
Reviewed-on: https://gerrit.libreoffice.org/57009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9b31d8904b54..c02a29120dff 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,7 @@ add_warning() if test "$have_WARNINGS" = "no"; then echo "*************************************" > warn have_WARNINGS="yes" - if which tput >/dev/null 2>/dev/null && test `tput colors` -ge 8; then + if which tput >/dev/null && test "`tput colors 2>/dev/null || echo 0`" -ge 8; then dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@ COLORWARN='*@<:@1;33;40m WARNING @<:@0m:' else |