Skip to content

Commit 60080cd

Browse files
[appveyor] fix create-project phpunit
1 parent d61ec43 commit 60080cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/simple-phpunit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
6161
@mkdir($PHPUNIT_DIR, 0777, true);
6262
chdir($PHPUNIT_DIR);
6363
if (file_exists("phpunit-$PHPUNIT_VERSION")) {
64-
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION"));
64+
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? 'rmdir /S /Q %s > NUL': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION.old"));
65+
rename("phpunit-$PHPUNIT_VERSION", "phpunit-$PHPUNIT_VERSION.old");
66+
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? 'rmdir /S /Q %s': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION.old"));
6567
}
6668
passthru("$COMPOSER create-project --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
6769
chdir("phpunit-$PHPUNIT_VERSION");

0 commit comments

Comments
 (0)