File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
tests/TestCase/Log/Engine Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -154,16 +154,16 @@ class ConsoleOutput
154
154
/**
155
155
* Construct the output object.
156
156
*
157
- * Checks for a pretty console environment. Ansicon allows pretty consoles
158
- * on windows, and is supported.
157
+ * Checks for a pretty console environment. Ansicon and ConEmu allows
158
+ * pretty consoles on windows, and is supported.
159
159
*
160
160
* @param string $stream The identifier of the stream to write output to.
161
161
*/
162
162
public function __construct ($ stream = 'php://stdout ' )
163
163
{
164
164
$ this ->_output = fopen ($ stream , 'w ' );
165
165
166
- if ((DS === '\\' && !(bool )env ('ANSICON ' )) ||
166
+ if ((DS === '\\' && !(bool )env ('ANSICON ' ) && env ( ' ConEmuANSI ' ) !== ' ON ' ) ||
167
167
(function_exists ('posix_isatty ' ) && !posix_isatty ($ this ->_output ))
168
168
) {
169
169
$ this ->_outputAs = self ::PLAIN ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class ConsoleLog extends BaseLog
57
57
*/
58
58
public function __construct (array $ config = [])
59
59
{
60
- if ((DS === '\\' && !(bool )env ('ANSICON ' )) ||
60
+ if ((DS === '\\' && !(bool )env ('ANSICON ' ) && env ( ' ConEmuANSI ' ) !== ' ON ' ) ||
61
61
(function_exists ('posix_isatty ' ) && !posix_isatty ($ this ->_output ))
62
62
) {
63
63
$ this ->_defaultConfig ['outputAs ' ] = ConsoleOutput::PLAIN ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public function testlogToFileStream()
68
68
*/
69
69
public function testDefaultOutputAs ()
70
70
{
71
- if ((DS === '\\' && !(bool )env ('ANSICON ' )) ||
71
+ if ((DS === '\\' && !(bool )env ('ANSICON ' ) && env ( ' ConEmuANSI ' ) !== ' ON ' ) ||
72
72
(function_exists ('posix_isatty ' ) && !posix_isatty (null ))
73
73
) {
74
74
$ expected = ConsoleOutput::PLAIN ;
You can’t perform that action at this time.
0 commit comments