1
0
Fork 0

Disable color output in tests by default to avoid issues on windows, fixes #11598

pull/11607/head
Jordi Boggiano 2023-08-30 15:02:15 +02:00
parent 80b02cdef9
commit 52f52dd636
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -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');