Clean up vendor dir after a package was removed
parent
b84bcd84d6
commit
90732fd03f
|
@ -127,6 +127,13 @@ class LibraryInstaller implements InstallerInterface
|
||||||
$this->downloadManager->remove($package, $downloadPath);
|
$this->downloadManager->remove($package, $downloadPath);
|
||||||
$this->removeBinaries($package);
|
$this->removeBinaries($package);
|
||||||
$repo->removePackage($package);
|
$repo->removePackage($package);
|
||||||
|
|
||||||
|
if (strpos($package->getName(), '/')) {
|
||||||
|
$packageVendorDir = dirname($downloadPath);
|
||||||
|
if (is_dir($packageVendorDir) && !glob($packageVendorDir.'/*')) {
|
||||||
|
@rmdir($packageVendorDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue