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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111968 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-12 21:52:19 +00:00
parent 8f41e08139
commit 477709f0da

View File

@ -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;
}