1
0
Fork 0

Merge branch '2.2' into 2.3

pull/10897/head
Jordi Boggiano 2022-06-22 13:49:11 +02:00
commit 30a8b82b15
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 13 additions and 2 deletions

View File

@ -253,7 +253,14 @@ class EventDispatcher
}
} else {
$args = implode(' ', array_map(array('Composer\Util\ProcessExecutor', 'escape'), $event->getArguments()));
$exec = $callable . ($args === '' ? '' : ' '.$args);
// @putenv does not receive arguments
if (strpos($callable, '@putenv ') === 0) {
$exec = $callable;
} else {
$exec = $callable . ($args === '' ? '' : ' '.$args);
}
if ($this->io->isVerbose()) {
$this->io->writeError(sprintf('> %s: %s', $event->getName(), $exec));
} elseif ($event->getName() !== '__exec_command') {

View File

@ -226,7 +226,11 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
}
}
$this->addPackage($this->loader->load($package));
try {
$this->addPackage($this->loader->load($package));
} catch (\Exception $e) {
throw new \RuntimeException('Failed loading the package in '.$composerFilePath, 0, $e);
}
}
}