1
0
Fork 0

Add verbose output to show when scripts get skipped by the new env var, refs #12290

main
Jordi Boggiano 2025-02-25 12:41:29 +01:00
parent 46e3110257
commit 59d3f96429
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -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 <info>'.$event->getName().'</info> because of COMPOSER_SKIP_SCRIPTS', true, IOInterface::VERBOSE);
return [];
}