Allow to disable progress bar display with the COURSIER_NO_TERM

environment variable by default

COURSIER_NO_TERM just has to be non-empty.
This commit is contained in:
Alexandre Archambault 2016-02-22 23:00:20 +01:00
parent 2ee0253d13
commit 117e469ed9
2 changed files with 2 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import scala.collection.mutable.ArrayBuffer
class TermDisplay(
out: Writer,
var fallbackMode: Boolean = false
var fallbackMode: Boolean = sys.env.get("COURSIER_NO_TERM").nonEmpty
) extends Cache.Logger {
private val ansi = new Ansi(out)

View File

@ -261,10 +261,7 @@ object Tasks {
val pool = Executors.newFixedThreadPool(parallelDownloads, Strategy.DefaultDaemonThreadFactory)
def createLogger() = new TermDisplay(
new OutputStreamWriter(System.err),
fallbackMode = sys.env.get("COURSIER_NO_TERM").nonEmpty
)
def createLogger() = new TermDisplay(new OutputStreamWriter(System.err))
val resLogger = createLogger()