Skip to content

Commit

Permalink
Set color option to what is supported by the current env (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanblumenberg authored and sindresorhus committed May 23, 2018
1 parent c5da1d1 commit eb1f5cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const dargs = require('dargs');
const execa = require('execa');
const PluginError = require('plugin-error');
const supportsColor = require('supports-color');
const through = require('through2');
// TODO: Use execa localDir option when available
const npmRunPath = require('npm-run-path');
Expand All @@ -16,7 +17,7 @@ const MULTIPLE_OPTS = new Set([

module.exports = opts => {
opts = Object.assign({
colors: true,
colors: Boolean(supportsColor.stdout),
suppress: false
}, opts);

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"mocha": "^5.2.0",
"npm-run-path": "^2.0.2",
"plugin-error": "^0.1.2",
"supports-color": "^5.4.0",
"through2": "^2.0.3"
},
"devDependencies": {
Expand Down

0 comments on commit eb1f5cc

Please sign in to comment.