mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
parent
e19f621314
commit
94b2ea29a6
3 changed files with 5 additions and 5 deletions
|
@ -153,15 +153,15 @@ class ConsoleOutput {
|
|||
/**
|
||||
* Construct the output object.
|
||||
*
|
||||
* Checks for a pretty console environment. Ansicon allows pretty consoles
|
||||
* on Windows, and is supported.
|
||||
* Checks for a pretty console environment. Ansicon and ConEmu allows
|
||||
* pretty consoles on Windows, and is supported.
|
||||
*
|
||||
* @param string $stream The identifier of the stream to write output to.
|
||||
*/
|
||||
public function __construct($stream = 'php://stdout') {
|
||||
$this->_output = fopen($stream, 'w');
|
||||
|
||||
if ((DS === '\\' && !(bool)env('ANSICON')) ||
|
||||
if ((DS === '\\' && !(bool)env('ANSICON') && env('ConEmuANSI') !== 'ON') ||
|
||||
$stream === 'php://output' ||
|
||||
(function_exists('posix_isatty') && !posix_isatty($this->_output))
|
||||
) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class ConsoleLog extends BaseLog {
|
|||
*/
|
||||
public function __construct($config = array()) {
|
||||
parent::__construct($config);
|
||||
if ((DS === '\\' && !(bool)env('ANSICON')) ||
|
||||
if ((DS === '\\' && !(bool)env('ANSICON') && env('ConEmuANSI') !== 'ON') ||
|
||||
(function_exists('posix_isatty') && !posix_isatty($this->_output))
|
||||
) {
|
||||
$outputAs = ConsoleOutput::PLAIN;
|
||||
|
|
|
@ -139,7 +139,7 @@ class ConsoleLogTest extends CakeTestCase {
|
|||
TestCakeLog::config('test_console_log', array(
|
||||
'engine' => 'TestConsole',
|
||||
));
|
||||
if ((DS === '\\' && !(bool)env('ANSICON')) ||
|
||||
if ((DS === '\\' && !(bool)env('ANSICON') && env('ConEmuANSI') !== 'ON') ||
|
||||
(function_exists('posix_isatty') && !posix_isatty(null))
|
||||
) {
|
||||
$expected = ConsoleOutput::PLAIN;
|
||||
|
|
Loading…
Reference in a new issue