mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
8f41e08139
commit
477709f0da
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user