mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #4572 Fixed Windows failure on SS_Cli::supports_colour() because posix functions are not supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100560 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1e46412cdb
commit
b35fb2b5ad
@ -12,7 +12,7 @@ class SS_Cli extends Object {
|
||||
*/
|
||||
static function supports_colour() {
|
||||
if(!defined('STDOUT')) define('STDOUT', fopen("php://stdout","w"));
|
||||
return @posix_isatty(STDOUT);
|
||||
return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user