diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index aa2d46062..b785c4da2 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -266,6 +266,11 @@ class LibraryInstaller implements InstallerInterface $this->filesystem->unlink($link.'.bat'); } } + + // attempt removing the bin dir in case it is left empty + if ($this->filesystem->isDirEmpty($this->binDir)) { + @rmdir($this->binDir); + } } protected function initializeVendorDir()