瀏覽代碼

Clone added packages in update

Jordi Boggiano 13 年之前
父節點
當前提交
b667cf98c2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Installer/LibraryInstaller.php

+ 1 - 1
src/Composer/Installer/LibraryInstaller.php

@@ -100,7 +100,7 @@ class LibraryInstaller implements InstallerInterface
 
         $this->downloadManager->update($initial, $target, $downloadPath);
         $this->repository->removePackage($initial);
-        $this->repository->addPackage($target);
+        $this->repository->addPackage(clone $target);
     }
 
     /**