diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/util/Properties.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala index 7b21351cf6..29a635fcbe 100644 --- a/src/library/scala/util/Properties.scala +++ b/src/library/scala/util/Properties.scala @@ -154,6 +154,12 @@ private[scala] trait PropertiesTrait { /* Some runtime values. */ private[scala] def isAvian = javaVmName contains "Avian" + private[scala] def coloredOutputEnabled: Boolean = propOrElse("scala.color", "auto") match { + case "auto" => System.console() != null && !isWin + case a if a.toLowerCase() == "true" => true + case _ => false + } + // This is looking for javac, tools.jar, etc. // Tries JDK_HOME first, then the more common but likely jre JAVA_HOME, // and finally the system property based javaHome. |