1
0
Fork 0

Allow referencing scripts to extends @composer

pull/8566/head
Jérôme Billiras 2019-09-06 11:24:49 +02:00 committed by Jordi Boggiano
parent d14d411fa4
commit 58e2956b95
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ class EventDispatcher
$args = array_merge($script, $event->getArguments());
$flags = $event->getFlags();
if (substr($callable, 0, 10) === '@composer ') {
$exec = $this->getPhpExecCommand() . ' ' . ProcessExecutor::escape(getenv('COMPOSER_BINARY')) . substr($callable, 9);
$exec = $this->getPhpExecCommand() . ' ' . ProcessExecutor::escape(getenv('COMPOSER_BINARY')) . ' ' . implode(' ', $args);
if (0 !== ($exitCode = $this->process->execute($exec))) {
$this->io->writeError(sprintf('<error>Script %s handling the %s event returned with error code '.$exitCode.'</error>', $callable, $event->getName()), true, IOInterface::QUIET);