From 9f27260d0264744f7cef9843f3664a836a2c4343 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 17 Mar 2010 00:40:10 +0000 Subject: [PATCH] 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 --- dev/Cli.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/Cli.php b/dev/Cli.php index 7165dd3a7..2cb05eb23 100644 --- a/dev/Cli.php +++ b/dev/Cli.php @@ -11,6 +11,9 @@ class SS_Cli extends Object { * Returns true if the current STDOUT supports the use of colour control codes. */ 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")); return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false; }