From 113751ea458320253650228cc56f0d242e7b69ae Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 25 May 2013 17:40:31 +0400 Subject: [PATCH] Fixed detection of ANSI color support on Windows --- framework/yii/helpers/base/Console.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/yii/helpers/base/Console.php b/framework/yii/helpers/base/Console.php index 603f0bd..d9068e4 100644 --- a/framework/yii/helpers/base/Console.php +++ b/framework/yii/helpers/base/Console.php @@ -547,9 +547,9 @@ class Console } /** - * Returns true if the stream supports colorization. ANSI colors is disabled if not supported by the stream. + * Returns true if the stream supports colorization. ANSI colors are disabled if not supported by the stream. * - * - windows without asicon + * - windows without ansicon * - not tty consoles * * @param mixed $stream @@ -558,7 +558,7 @@ class Console public static function streamSupportsAnsiColors($stream) { return DIRECTORY_SEPARATOR == '\\' - ? null !== getenv('ANSICON') + ? getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON' : function_exists('posix_isatty') && @posix_isatty($stream); }