diff --git a/index.js b/index.js index 1704131..1e6163b 100644 --- a/index.js +++ b/index.js @@ -53,6 +53,10 @@ function supportsColor(stream) { const min = forceColor ? 1 : 0; + if (env.TERM === 'dumb') { + return min; + } + if (process.platform === 'win32') { // Node.js 7.5.0 is the first version of Node.js to include a patch to // libuv that enables 256 color output on Windows. Anything earlier and it @@ -112,10 +116,6 @@ function supportsColor(stream) { return 1; } - if (env.TERM === 'dumb') { - return min; - } - return min; }