8000 merged branch hason/conemu (PR #5498) · romainneutron/symfony@ddb8e5c · GitHub
[go: up one dir, main page]

Skip to content

Commit ddb8e5c

Browse files
committed
merged branch hason/conemu (PR symfony#5498)
Commits ------- bb2566c [Console] Console colorization is also provided by ConEmu on Windows Discussion ---------- [Console] Console colorization is also provided by ConEmu on Windows Bug fix: no Feature addition: yes Backwards compatibility break: no Symfony2 tests pass: yes License of the code: MIT See http://code.google.com/p/conemu-maximus5/wiki/AnsiEscapeCodes#Переменная_окружения --------------------------------------------------------------------------- by fabpot at 2012-09-16T07:43:55Z Can you add a note about it in the changelog of the component? thanks
2 parents 8f034ce + bb2566c commit ddb8e5c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Symfony/Component/Console/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
2.1.2
5+
-----
6+
7+
* added support for colorization on Windows via ConEmu
8+
49
2.1.0
510
-----
611

src/Symfony/Component/Console/Output/StreamOutput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function doWrite($message, $newline)
9595
*
9696
* Colorization is disabled if not supported by the stream:
9797
*
98-
* - windows without ansicon
98+
* - windows without ansicon and ConEmu
9999
* - non tty consoles
100100
*
101101
* @return Boolean true if the stream supports colorization, false otherwise
@@ -104,7 +104,7 @@ protected function hasColorSupport()
104104
{
105105
// @codeCoverageIgnoreStart
106106
if (DIRECTORY_SEPARATOR == '\\') {
107-
return false !== getenv('ANSICON');
107+
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
108108
}
109109

110110
return function_exists('posix_isatty') && @posix_isatty($this->stream);

0 commit comments

Comments
 (0)
0