mirror of https://github.com/sbt/sbt.git
Enable color by default in ci builds
This channge should turn color on by default in ci builds (see https://github.com/sbt/sbt/issues/5269). It can still be disabled with -Dsbt.color=false.
This commit is contained in:
parent
a892a83681
commit
c46de920ab
|
|
@ -314,7 +314,7 @@ object Terminal {
|
|||
private[this] def useColorDefault: Boolean = {
|
||||
// This approximates that both stdin and stdio are connected,
|
||||
// so by default color will be turned off for pipes and redirects.
|
||||
props.map(_.color).orElse(isColorEnabledProp).getOrElse(hasConsole && !isDumbTerminal)
|
||||
props.map(_.color).orElse(isColorEnabledProp).getOrElse((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