From 146c3e25df31d39165b4ad99f4d523e7806c30fb Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Mon, 3 Apr 2017 13:33:45 +0100 Subject: [PATCH] Set default color config based on supports-color --- lib/cli.js | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli.js b/lib/cli.js index 7dd6d1805..f6213f107 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -75,7 +75,7 @@ exports.run = () => { ], default: { cache: conf.cache, - color: 'color' in conf ? conf.color : true, + color: 'color' in conf ? conf.color : require('supports-color') !== false, concurrency: conf.concurrency, failFast: conf.failFast, init: conf.init, diff --git a/package.json b/package.json index 443e26859..5cf3c79dc 100644 --- a/package.json +++ b/package.json @@ -161,6 +161,7 @@ "stack-utils": "^1.0.0", "strip-ansi": "^3.0.1", "strip-bom-buf": "^1.0.0", + "supports-color": "^3.2.3", "time-require": "^0.1.2", "unique-temp-dir": "^1.0.0", "update-notifier": "^2.1.0"