Skip to content

Commit b8d4e19

Browse files
bedag-mooalexeagle
authored andcommitted
fix(@angular-devkit/core): detect mingw terminal as color capable (#11834)
restoring color to git-bash users under windows Fixes #11833
1 parent 71f2e71 commit b8d4e19

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/core/src/terminal

1 file changed

+2
-2
lines changed

packages/angular_devkit/core/src/terminal/caps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ function _getColorLevel(stream: Socket): 0 | 1 | 2 | 3 {
8484
}
8585
}
8686

87-
if (stream && !stream.isTTY) {
87+
if (stream && !stream.isTTY && !_env.MSYSTEM) {
8888
return 0;
8989
}
9090

91-
if (_platform.startsWith('win32')) {
91+
if (_platform.startsWith('win32') && !_env.MSYSTEM) {
9292
// Node.js 7.5.0 is the first version of Node.js to include a patch to
9393
// libuv that enables 256 color output on Windows. Anything earlier and it
9494
// won't work. However, here we target Node.js 8 at minimum as it is an LTS

0 commit comments

Comments
 (0)