[Console] Console colorization is also provided by ConEmu on Windows

This commit is contained in:
Martin Hasoň 2012-09-12 11:29:58 +02:00
parent 885d473366
commit bb2566c17d
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
2.1.2
-----
* added support for colorization on Windows via ConEmu
2.1.0
-----

View File

@ -95,7 +95,7 @@ class StreamOutput extends Output
*
* Colorization is disabled if not supported by the stream:
*
* - windows without ansicon
* - windows without ansicon and ConEmu
* - non tty consoles
*
* @return Boolean true if the stream supports colorization, false otherwise
@ -104,7 +104,7 @@ class StreamOutput extends Output
{
// @codeCoverageIgnoreStart
if (DIRECTORY_SEPARATOR == '\\') {
return false !== getenv('ANSICON');
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
}
return function_exists('posix_isatty') && @posix_isatty($this->stream);