Update index.js
This commit is contained in:
parent
45bdd52392
commit
4f407d4440
1 changed files with 4 additions and 2 deletions
6
source/vendor/supports-color/index.js
vendored
6
source/vendor/supports-color/index.js
vendored
|
|
@ -138,10 +138,12 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
||||||
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
||||||
|
|
||||||
switch (env.TERM_PROGRAM) {
|
switch (env.TERM_PROGRAM) {
|
||||||
case 'iTerm.app':
|
case 'iTerm.app': {
|
||||||
return version >= 3 ? 3 : 2;
|
return version >= 3 ? 3 : 2;
|
||||||
case 'Apple_Terminal':
|
}
|
||||||
|
case 'Apple_Terminal': {
|
||||||
return 2;
|
return 2;
|
||||||
|
}
|
||||||
// No default
|
// No default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue