From a17d0e9caac490e40e366a5e26c8cf1fe1760fad Mon Sep 17 00:00:00 2001 From: Luke Downing Date: Wed, 25 Aug 2021 12:13:08 +0100 Subject: [PATCH] Adds support for forcing console colors through an environment variable --- src/ConsoleColor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ConsoleColor.php b/src/ConsoleColor.php index d46e8643..714424ea 100644 --- a/src/ConsoleColor.php +++ b/src/ConsoleColor.php @@ -205,6 +205,11 @@ public function removeTheme($name) */ public function isSupported() { + // The COLLISION_FORCE_COLORS variable is for internal purposes only + if (getenv('COLLISION_FORCE_COLORS') !== false) { + return true; + } + if (DIRECTORY_SEPARATOR === '\\') { return getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON'; }