We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f3ace4 commit b84d1acCopy full SHA for b84d1ac
1 file changed
lib/system/supports-colors.js
@@ -37,10 +37,6 @@ module.exports = (function () {
37
return true;
38
}
39
40
- if (process.stdout && !process.stdout.isTTY) {
41
- return false;
42
- }
43
-
44
if (process.platform === 'win32') {
45
46
@@ -49,12 +45,16 @@ module.exports = (function () {
49
50
51
47
52
- if (process.env.TERM === 'dumb') {
48
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
53
return false;
54
55
56
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
57
- return true;
+ if (process.env.TERM === 'dumb') {
+ return false;
58
59
60
0 commit comments