File tree 1 file changed +6
-2
lines changed
src/Symfony/Component/Console/Output
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ protected function doWrite($message, $newline)
85
85
*
86
86
* Colorization is disabled if not supported by the stream:
87
87
*
88
- * - Windows without Ansicon, ConEmu or Mintty
88
+ * - Windows before 10.0.10586 without Ansicon, ConEmu or Mintty
89
89
* - non tty consoles
90
90
*
91
91
* @return bool true if the stream supports colorization, false otherwise
@@ -94,7 +94,11 @@ protected function hasColorSupport()
94
94
{
95
95
// @codeCoverageIgnoreStart
96
96
if (DIRECTORY_SEPARATOR === '\\' ) {
97
- return false !== getenv ('ANSICON ' ) || 'ON ' === getenv ('ConEmuANSI ' ) || 'xterm ' === getenv ('TERM ' );
97
+ return
98
+ 0 >= version_compare ('10.0.10586 ' , PHP_WINDOWS_VERSION_MAJOR .'. ' .PHP_WINDOWS_VERSION_MINOR .'. ' .PHP_WINDOWS_VERSION_BUILD )
99
+ || false !== getenv ('ANSICON ' )
100
+ || 'ON ' === getenv ('ConEmuANSI ' )
101
+ || 'xterm ' === getenv ('TERM ' );
98
102
}
99
103
100
104
return function_exists ('posix_isatty ' ) && @posix_isatty ($ this ->stream );
You can’t perform that action at this time.
0 commit comments