Allow supershell to work in no color mode

Supershell actually works quite well in no color mode. On the sbt side,
we still want to disable supershell automatically if the output is not a
terminal or no color is set, but this commit allows the user to force
supershell through -Dsbt.supershell or the useSuperShell setting even
when no color is set.
This commit is contained in:
Ethan Atkins 2019-09-02 11:07:48 -07:00
parent a5666e97b6
commit 635316902d
1 changed files with 5 additions and 5 deletions

View File

@ -523,12 +523,12 @@ class ConsoleAppender private[ConsoleAppender] (
}
private def write(msg: String): Unit = {
if (!useFormat || !ansiCodesSupported) {
out.println(EscHelpers.removeEscapeSequences(msg))
} else if (ConsoleAppender.showProgress) {
SuperShellLogger.writeMsg(out, msg)
val toWrite =
if (!useFormat || !ansiCodesSupported) EscHelpers.removeEscapeSequences(msg) else msg
if (ConsoleAppender.showProgress) {
SuperShellLogger.writeMsg(out, toWrite)
} else {
out.println(msg)
out.println(toWrite)
}
}