mirror of https://github.com/sbt/sbt.git
Enable ansi codes if supershell is enabled
Running sbt with -Dsbt.supershell=true and -Dsbt.color=true doesn't work well because the isAnsiSupported flag is set to false when -Dsbt.color=false. This causes the processing that ensures that supershell lines do not get interleaved with normal log lines to be skipped. To fix this, we can enable ansi codes when supershell is explicitly enabled.
This commit is contained in:
parent
78620cd902
commit
3d179cda75
|
|
@ -306,8 +306,9 @@ object Terminal {
|
|||
case _ => sys.props.get("sbt.log.format").flatMap(parseLogOption)
|
||||
}
|
||||
}
|
||||
private[this] lazy val superShellEnabled = sys.props.get("sbt.supershell").map(_ == "true")
|
||||
private[sbt] lazy val isAnsiSupported: Boolean =
|
||||
logFormatEnabled.getOrElse(useColorDefault && !isCI)
|
||||
logFormatEnabled.orElse(superShellEnabled).getOrElse(useColorDefault && !isCI)
|
||||
private[this] val isDumbTerminal = "dumb" == System.getenv("TERM")
|
||||
private[this] val hasConsole = Option(java.lang.System.console).isDefined
|
||||
private[this] def useColorDefault: Boolean = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue