]> git.sur5r.net Git - i3/i3/commitdiff
fix warnings when CONTINUOUS_INTEGRATION env var is unset
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 16 Mar 2015 21:38:39 +0000 (22:38 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 16 Mar 2015 21:38:39 +0000 (22:38 +0100)
testcases/lib/StatusLine.pm

index 379fd3d6c133bb6f1a0524fd61639795a98199f0..f2487797876b7f7520db35c5dbcb0997d51d3b15 100644 (file)
@@ -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