Set SimpleTerminal properties based on system props

When running sbt 1.4.0 with -Dsbt.ci=true and -Dsbt.color=true, there is
no color output. This was because in this scenario, a SimpleTerminal was
used and isAnsiSupported and isColorEnabled were hardcoded to false
rather than reading the values from the system properties.
This commit is contained in:
Ethan Atkins 2020-10-08 09:35:58 -07:00
parent a2fc24bb6f
commit f9bc9049ee
1 changed files with 2 additions and 2 deletions

View File

@ -960,8 +960,8 @@ object Terminal {
override def getStringCapability(capability: String): String = null
override def getWidth: Int = 0
override def inputStream: InputStream = nullInputStream
override def isAnsiSupported: Boolean = false
override def isColorEnabled: Boolean = false
override def isAnsiSupported: Boolean = formatEnabledInEnv
override def isColorEnabled: Boolean = isColorEnabledProp.getOrElse(formatEnabledInEnv)
override def isEchoEnabled: Boolean = false
override def isSuccessEnabled: Boolean = true
override def isSupershellEnabled: Boolean = false