diff --git a/main-actions/src/main/scala/sbt/ForkTests.scala b/main-actions/src/main/scala/sbt/ForkTests.scala index b0f83392b..eab1b0d7f 100755 --- a/main-actions/src/main/scala/sbt/ForkTests.scala +++ b/main-actions/src/main/scala/sbt/ForkTests.scala @@ -18,7 +18,7 @@ import sbt.util.Logger import sbt.ConcurrentRestrictions.Tag import sbt.protocol.testing._ import sbt.internal.util.Util.{ AnyOps, none } -import sbt.internal.util.{ RunningProcesses, Terminal } +import sbt.internal.util.{ RunningProcesses, Terminal => UTerminal } private[sbt] object ForkTests { def apply( @@ -97,7 +97,7 @@ private[sbt] object ForkTests { val is = new ObjectInputStream(socket.getInputStream) try { - val config = new ForkConfiguration(Terminal.isAnsiSupported, parallel) + val config = new ForkConfiguration(UTerminal.isAnsiSupported, parallel) os.writeObject(config) val taskdefs = opts.tests.map { t => diff --git a/main-command/src/main/scala/sbt/Highlight.scala b/main-command/src/main/scala/sbt/Highlight.scala index 140ad554a..8dc05f9b1 100644 --- a/main-command/src/main/scala/sbt/Highlight.scala +++ b/main-command/src/main/scala/sbt/Highlight.scala @@ -10,13 +10,13 @@ package sbt import java.util.regex.Pattern import scala.Console.{ BOLD, RESET } -import sbt.internal.util.Terminal +import sbt.internal.util.{ Terminal => UTerminal } object Highlight { def showMatches(pattern: Pattern)(line: String): Option[String] = { val matcher = pattern.matcher(line) - if (Terminal.isColorEnabled) { + if (UTerminal.isColorEnabled) { // ANSI codes like \033[39m (normal text color) don't work on Windows val highlighted = matcher.replaceAll(scala.Console.RED + "$0" + RESET) if (highlighted == line) None else Some(highlighted) @@ -26,5 +26,5 @@ object Highlight { None } def bold(s: String) = - if (Terminal.isColorEnabled) BOLD + s.replace(RESET, RESET + BOLD) + RESET else s + if (UTerminal.isColorEnabled) BOLD + s.replace(RESET, RESET + BOLD) + RESET else s }