MINOR: Fix output format of buildbot test runs to not include colour control codes.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101172 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-03-17 00:40:10 +00:00
parent f9836b0f01
commit 9f27260d02

View File

@ -11,6 +11,9 @@ class SS_Cli extends Object {
* Returns true if the current STDOUT supports the use of colour control codes. * Returns true if the current STDOUT supports the use of colour control codes.
*/ */
static function supports_colour() { static function supports_colour() {
// Special case for buildbot
if(isset($_ENV['_']) && strpos($_ENV['_'],'buildbot') !== false) return false;
if(!defined('STDOUT')) define('STDOUT', fopen("php://stdout","w")); if(!defined('STDOUT')) define('STDOUT', fopen("php://stdout","w"));
return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false; return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false;
} }