소스 검색

Avoid sending install notifications in dry-run mode

Jordi Boggiano 10 년 전
부모
커밋
4f934d9282
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/Composer/Installer.php

+ 6 - 2
src/Composer/Installer.php

@@ -234,11 +234,15 @@ class Installer
                 return $res;
             }
         } catch (\Exception $e) {
-            $this->installationManager->notifyInstalls($this->io);
+            if (!$this->dryRun) {
+                $this->installationManager->notifyInstalls($this->io);
+            }
 
             throw $e;
         }
-        $this->installationManager->notifyInstalls($this->io);
+        if (!$this->dryRun) {
+            $this->installationManager->notifyInstalls($this->io);
+        }
 
         // output suggestions if we're in dev mode
         if ($this->devMode) {