Skip to content

Commit

Permalink
cli(color): fix color option
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjun committed Oct 30, 2018
1 parent 20a2598 commit ed5b650
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bin/cli.js
Expand Up @@ -80,9 +80,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
type: "boolean",
alias: "colors",
default: function supportsColor() {
if (process.stdout.isTTY === true) {
return require("supports-color").supportsColor;
}
return require("supports-color").stdout;
},
group: DISPLAY_GROUP,
describe: "Enables/Disables colors on the console"
Expand Down Expand Up @@ -324,10 +322,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
}
});

if (
typeof outputOptions.colors === "undefined" &&
process.stdout.isTTY === true
)
if (typeof outputOptions.colors === "undefined")
outputOptions.colors = require("supports-color").stdout;

ifArg("sort-modules-by", function(value) {
Expand Down

0 comments on commit ed5b650

Please sign in to comment.