@@ -106,15 +106,21 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
106106 }
107107 }
108108
109+ if (in_array ('--colors=never ' , $ argv , true ) || (isset ($ argv [$ i = array_search ('never ' , $ argv , true ) - 1 ]) && '--colors ' === $ argv [$ i ])) {
110+ $ COMPOSER .= ' --no-ansi ' ;
111+ } else {
112+ $ COMPOSER .= ' --ansi ' ;
113+ }
114+
109115 $ info += array (
110116 'versions ' => array (),
111117 'requires ' => array ('php ' => '* ' ),
112118 );
113119
114120 if (1 === \count ($ info ['versions ' ])) {
115- $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi - s dev phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
121+ $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
116122 } else {
117- $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
123+ $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
118124 }
119125
120126 @copy ("phpunit- $ PHPUNIT_VERSION /phpunit.xsd " , 'phpunit.xsd ' );
@@ -144,7 +150,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
144150 putenv ("COMPOSER_ROOT_VERSION= $ PHPUNIT_VERSION .99 " );
145151 $ q = '\\' === DIRECTORY_SEPARATOR ? '" ' : '' ;
146152 // --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS
147- $ exit = proc_close (proc_open ("$ q$ COMPOSER install --no-dev --prefer-dist --no-progress --ansi $ q " , array (), $ p , getcwd ()));
153+ $ exit = proc_close (proc_open ("$ q$ COMPOSER install --no-dev --prefer-dist --no-progress $ q " , array (), $ p , getcwd ()));
148154 putenv ('COMPOSER_ROOT_VERSION ' .(false !== $ prevRoot ? '= ' .$ prevRoot : '' ));
149155 if ($ exit ) {
150156 exit ($ exit );
0 commit comments