Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit fa34354

Browse files
committed
Bugfix for issue #6
1 parent 30b7333 commit fa34354

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Installer/Installer.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,18 @@ protected function executeComposerCommand($installPath, $beVerbose = false)
8282
{
8383
$composerStatus = 0;
8484

85-
rmdir($installPath.DIRECTORY_SEPARATOR.'pkgs');
85+
$pkgsDir = $installPath.DIRECTORY_SEPARATOR.'pkgs';
86+
if (file_exists($pkgsDir)) {
87+
foreach (
88+
new \RecursiveIteratorIterator(
89+
new \RecursiveDirectoryIterator($pkgsDir, \FilesystemIterator::SKIP_DOTS),
90+
\RecursiveIteratorIterator::CHILD_FIRST
91+
) as $path
92+
) {
93+
$path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());
94+
}
95+
rmdir($pkgsDir);
96+
}
8697

8798
if ($beVerbose) {
8899
echo "\n";

0 commit comments

Comments
 (0)