瀏覽代碼

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;
                 return $res;
             }
             }
         } catch (\Exception $e) {
         } catch (\Exception $e) {
-            $this->installationManager->notifyInstalls($this->io);
+            if (!$this->dryRun) {
+                $this->installationManager->notifyInstalls($this->io);
+            }
 
 
             throw $e;
             throw $e;
         }
         }
-        $this->installationManager->notifyInstalls($this->io);
+        if (!$this->dryRun) {
+            $this->installationManager->notifyInstalls($this->io);
+        }
 
 
         // output suggestions if we're in dev mode
         // output suggestions if we're in dev mode
         if ($this->devMode) {
         if ($this->devMode) {