Skip to content

Commit b84d1ac

Browse files
committed
fixed support-colors condition orders, this should fix cygwin issues
1 parent 9f3ace4 commit b84d1ac

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/system/supports-colors.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ module.exports = (function () {
3737
return true;
3838
}
3939

40-
if (process.stdout && !process.stdout.isTTY) {
41-
return false;
42-
}
43-
4440
if (process.platform === 'win32') {
4541
return true;
4642
}
@@ -49,12 +45,16 @@ module.exports = (function () {
4945
return true;
5046
}
5147

52-
if (process.env.TERM === 'dumb') {
48+
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
49+
return true;
50+
}
51+
52+
if (process.stdout && !process.stdout.isTTY) {
5353
return false;
5454
}
5555

56-
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
57-
return true;
56+
if (process.env.TERM === 'dumb') {
57+
return false;
5858
}
5959

6060
return false;

0 commit comments

Comments
 (0)