mirror of https://github.com/sbt/sbt.git
Merge pull request #5966 from eatkins/piped-output-fix
Remove ansi control characters from piped output
This commit is contained in:
commit
aec55af083
|
|
@ -91,9 +91,9 @@ private[sbt] final class ProgressState(
|
|||
printStream: PrintStream,
|
||||
hasProgress: Boolean
|
||||
): Unit = {
|
||||
val canClearPrompt = currentLineBytes.get.isEmpty
|
||||
addBytes(terminal, bytes)
|
||||
if (hasProgress) {
|
||||
val canClearPrompt = currentLineBytes.get.isEmpty
|
||||
addBytes(terminal, bytes)
|
||||
val toWrite = new ArrayBuffer[Byte]
|
||||
terminal.prompt match {
|
||||
case a: Prompt.AskUser if a.render.nonEmpty && canClearPrompt =>
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ object Terminal {
|
|||
private[sbt] def withStreams[T](isServer: Boolean)(f: => T): T =
|
||||
// In ci environments, don't touch the io streams unless run with -Dsbt.io.virtual=true
|
||||
if (System.getProperty("sbt.io.virtual", "") == "true" || (logFormatEnabled.getOrElse(true) && !isCI)) {
|
||||
hasProgress.set(isServer)
|
||||
hasProgress.set(isServer && formatEnabledInEnv)
|
||||
consoleTerminalHolder.set(newConsoleTerminal())
|
||||
activeTerminal.set(consoleTerminalHolder.get)
|
||||
try withOut(withIn(f))
|
||||
|
|
|
|||
Loading…
Reference in New Issue