From: Michael Stapelberg Date: Mon, 16 Mar 2015 21:38:39 +0000 (+0100) Subject: fix warnings when CONTINUOUS_INTEGRATION env var is unset X-Git-Tag: 4.10.1~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1f99abf75bbb6df520f48a45b954d24eb5c42c7;p=i3%2Fi3 fix warnings when CONTINUOUS_INTEGRATION env var is unset --- diff --git a/testcases/lib/StatusLine.pm b/testcases/lib/StatusLine.pm index 379fd3d6..f2487797 100644 --- a/testcases/lib/StatusLine.pm +++ b/testcases/lib/StatusLine.pm @@ -19,7 +19,9 @@ sub noninteractive { # CONTINUOUS_INTEGRATION gets set when running under Travis, see # http://docs.travis-ci.com/user/ci-environment/ and # https://github.com/travis-ci/travis-ci/issues/1337 - return (! -t STDOUT) || $ENV{CONTINUOUS_INTEGRATION} eq 'true'; + return (! -t STDOUT) || ( + defined($ENV{CONTINUOUS_INTEGRATION}) && + $ENV{CONTINUOUS_INTEGRATION} eq 'true'); } # setup %ansi_line_upwards to map all working displays to the