Skip to content

Commit 146c3e2

Browse files
committed
Set default color config based on supports-color
1 parent 2283247 commit 146c3e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ exports.run = () => {
7575
],
7676
default: {
7777
cache: conf.cache,
78-
color: 'color' in conf ? conf.color : true,
78+
color: 'color' in conf ? conf.color : require('supports-color') !== false,
7979
concurrency: conf.concurrency,
8080
failFast: conf.failFast,
8181
init: conf.init,

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
"stack-utils": "^1.0.0",
162162
"strip-ansi": "^3.0.1",
163163
"strip-bom-buf": "^1.0.0",
164+
"supports-color": "^3.2.3",
164165
"time-require": "^0.1.2",
165166
"unique-temp-dir": "^1.0.0",
166167
"update-notifier": "^2.1.0"

0 commit comments

Comments
 (0)