1
0
Fork 0

Ignoring passed arguments for @putenv, closes #10846

pull/10897/head
Marek Stipek 2022-06-15 18:01:53 +02:00 committed by Jordi Boggiano
parent 5730c24c92
commit 690ab5166a
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 8 additions and 1 deletions

View File

@ -243,7 +243,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') {