.gradle/init.d/springColorLogging.gradle
changeset 838 98cdbead06be
parent 837 4ba0fe28be27
--- a/.gradle/init.d/springColorLogging.gradle	Wed Feb 22 10:23:40 2017 +0200
+++ b/.gradle/init.d/springColorLogging.gradle	Wed Feb 22 16:09:02 2017 +0200
@@ -1,7 +1,8 @@
 gradle.taskGraph.whenReady { graph ->
     // graph.getAllTasks().findAll().each { println it }
     def console = System.console() != null
-    if (! console) { console = System.getenv()["TERM"].startsWith("xterm") }
+    def term = System.getenv()["TERM"];
+    if (! console && term != null) { console = term.startsWith("xterm") }
     if (! console) return
     graph.getAllTasks().findAll({it.name.equals("bootRun")}).each {
         it.systemProperties 'spring.output.ansi.enabled': 'always'