diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 494fa6894..05b88f2f6 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -27,6 +27,11 @@ if (!class_exists(InstalledVersions::class, false)) { Platform::putEnv('COMPOSER_TESTS_ARE_RUNNING', '1'); +// ensure Windows color support detection does not attempt to use colors +// as this is dependent on env vars and not actual stream capabilities, see +// https://github.com/composer/composer/issues/11598 +Platform::putEnv('NO_COLOR', '1'); + // symfony/phpunit-bridge sets some default env vars which we do not need polluting the test env Platform::clearEnv('COMPOSER'); Platform::clearEnv('COMPOSER_VENDOR_DIR');