Преглед изворни кода

Merge pull request #1054 from mheleniak/clean_up_bat_files

Clean up *.bat files when binary is removed
Jordi Boggiano пре 12 година
родитељ
комит
e0dc045955
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      src/Composer/Installer/LibraryInstaller.php

+ 5 - 3
src/Composer/Installer/LibraryInstaller.php

@@ -226,10 +226,12 @@ class LibraryInstaller implements InstallerInterface
         }
         foreach ($binaries as $bin) {
             $link = $this->binDir.'/'.basename($bin);
-            if (!file_exists($link)) {
-                continue;
+            if (file_exists($link)) {
+                unlink($link);
+            }
+            if (file_exists($link.'.bat')) {
+                unlink($link.'.bat');
             }
-            unlink($link);
         }
     }