# HG changeset patch # User Oleksandr Gavenko # Date 1487772542 -7200 # Node ID 98cdbead06bef1df4adebdba23f8806568de161d # Parent 4ba0fe28be279ef9a01c20c67408668502507532 Fix: Cannot invoke method startsWith() on null object. diff -r 4ba0fe28be27 -r 98cdbead06be .gradle/init.d/springColorLogging.gradle --- 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'