Prechádzať zdrojové kódy

touch only if update

Жаков Виталий 5 rokov pred
rodič
commit
33db6ec71b
1 zmenil súbory, kde vykonal 9 pridanie a 0 odobranie
  1. 9 0
      src/Composer/Installer.php

+ 9 - 0
src/Composer/Installer.php

@@ -313,6 +313,15 @@ class Installer
             }
         }
 
+        if ($this->update) {
+            $vendorDir = $this->config->get('vendor-dir');
+            if (is_dir($vendorDir)) {
+                // suppress errors as this fails sometimes on OSX for no apparent reason
+                // see https://github.com/composer/composer/issues/4070#issuecomment-129792748
+                @touch($vendorDir);
+            }
+        }
+
         if ($this->runScripts) {
             // dispatch post event
             $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD;