Support ANSI color from gradle bootRun
Update the BootRunTask to record the state of the System.console() so that it can be picked up later by AnsiOutput. Fixes gh-747
This commit is contained in:
committed by
Phillip Webb
parent
ba2ea301f1
commit
d8308cbf45
@@ -54,6 +54,10 @@ public class BootRunTask extends JavaExec {
|
||||
|
||||
@Override
|
||||
public void exec() {
|
||||
if(System.console() != null) {
|
||||
// Record that the console is available here for AnsiOutput to detect later
|
||||
this.getEnvironment().put("spring.output.ansi.console-available", true);
|
||||
}
|
||||
addResourcesIfNecessary();
|
||||
super.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user