Only disable virtual io automatically in ci

Disabling virtual io prevents the thin client from working. It is
possible that a user may manually start a server with -Dsbt.color=false
but still want to connect a thin client.
This commit is contained in:
Ethan Atkins 2020-10-20 11:59:21 -07:00
parent 6f63b2ccfa
commit a892a83681
1 changed files with 1 additions and 1 deletions

View File

@ -333,7 +333,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)) {
if (System.getProperty("sbt.io.virtual", "") == "true" || !isCI) {
hasProgress.set(isServer && isAnsiSupported)
consoleTerminalHolder.set(newConsoleTerminal())
activeTerminal.set(consoleTerminalHolder.get)