diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index c7be2dc1c..790471ca8 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -84,8 +84,8 @@ class EventDispatcher $this->process = $process ?? new ProcessExecutor($io); $this->eventStack = []; $this->skipScripts = array_values(array_filter( - array_map('trim', explode(',', (string) Platform::getEnv('COMPOSER_SKIP_SCRIPTS'))), - function ($val) { + array_map('trim', explode(',', (string) Platform::getEnv('COMPOSER_SKIP_SCRIPTS'))), + function ($val) { return $val !== ''; } )); @@ -593,6 +593,8 @@ class EventDispatcher } if (in_array($event->getName(), $this->skipScripts, true)) { + $this->io->writeError('Skipped script listeners for '.$event->getName().' because of COMPOSER_SKIP_SCRIPTS', true, IOInterface::VERBOSE); + return []; }