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