From 33db6ec71bd2efc86b73c987878ddbd309d5c627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=96=D0=B0=D0=BA=D0=BE=D0=B2=20=D0=92=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D0=B9?= Date: Fri, 17 Jan 2020 10:58:52 +0500 Subject: [PATCH] touch only if update --- src/Composer/Installer.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index bf0523356..270c75544 100644 --- a/src/Composer/Installer.php +++ b/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;