From ff6f17a0155633f86440e10d7889f077e7fbc91c Mon Sep 17 00:00:00 2001 From: jvican Date: Tue, 3 Jul 2018 11:13:10 +0200 Subject: [PATCH] Support `NO_COLOR` Ref http://no-color.org/ --- frontend/src/main/scala/bloop/Cli.scala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/main/scala/bloop/Cli.scala b/frontend/src/main/scala/bloop/Cli.scala index aaebb60607..ad185f4ab8 100644 --- a/frontend/src/main/scala/bloop/Cli.scala +++ b/frontend/src/main/scala/bloop/Cli.scala @@ -228,8 +228,14 @@ object Cli { val commonOpts = cliOptions.common val configDirectory = getConfigDir(cliOptions) - val logger = - BloopLogger.at(configDirectory.syntax, commonOpts.out, commonOpts.err, cliOptions.verbose, !cliOptions.noColor) + val logger = BloopLogger.at( + configDirectory.syntax, + commonOpts.out, + commonOpts.err, + cliOptions.verbose, + !(cliOptions.noColor || commonOpts.env.containsKey("NO_COLOR")) + ) + val currentState = State.loadActiveStateFor(configDirectory, pool, cliOptions.common, logger) if (Files.exists(configDirectory.underlying)) {