From 6411170ede09ace8e5f1f018dcf5661846ed7d27 Mon Sep 17 00:00:00 2001 From: Antoine Gourlay Date: Wed, 8 Feb 2017 16:05:03 +0100 Subject: SD-256 enable colored output by default on unix `scala.color` now has 3 states: `true`, `false` and `auto` (the default). `auto` allows colors if not on windows and if the shell is interactive (as in, both stdin and stdout are a tty). The autodetect works as expected when run via SBT too, and it can always be overriden on the CLI or via JAVA_OPTS. --- src/reflect/scala/reflect/internal/TypeDebugging.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/reflect') diff --git a/src/reflect/scala/reflect/internal/TypeDebugging.scala b/src/reflect/scala/reflect/internal/TypeDebugging.scala index e9050b4e33..58359e66d9 100644 --- a/src/reflect/scala/reflect/internal/TypeDebugging.scala +++ b/src/reflect/scala/reflect/internal/TypeDebugging.scala @@ -59,7 +59,7 @@ trait TypeDebugging { object typeDebug { import scala.Console._ - private val colorsOk = sys.props contains "scala.color" + private val colorsOk = scala.util.Properties.coloredOutputEnabled private def inColor(s: String, color: String) = if (colorsOk && s != "") color + s + RESET else s private def inBold(s: String, color: String) = if (colorsOk && s != "") color + BOLD + s + RESET else s -- cgit v1.2.3