mirror of https://github.com/sbt/sbt.git
Disable color by default if formatting is disabled
If a user runs with -Dsbt.log.format=false or -Dsbt.log.noformat=true, we should disable color by default. Running with -Dsbt.color=true should make this possible.
This commit is contained in:
parent
8c3f2a50f7
commit
1d3af543f7
|
|
@ -317,7 +317,7 @@ object Terminal {
|
|||
props
|
||||
.map(_.color)
|
||||
.orElse(isColorEnabledProp)
|
||||
.getOrElse((hasConsole && !isDumbTerminal && logFormatEnabled.getOrElse(true)) || isCI)
|
||||
.getOrElse(logFormatEnabled.getOrElse(true) && ((hasConsole && !isDumbTerminal) || isCI))
|
||||
}
|
||||
private[this] lazy val isColorEnabledProp: Option[Boolean] =
|
||||
sys.props.get("sbt.color").orElse(sys.props.get("sbt.colour")).flatMap(parseLogOption)
|
||||
|
|
|
|||
Loading…
Reference in New Issue