Use a different way to suppress output than changing output verbosity in exec command, fixes #9711
parent
03e8cacd12
commit
8f7597da22
|
@ -88,9 +88,6 @@ EOT
|
|||
|
||||
$dispatcher = $composer->getEventDispatcher();
|
||||
$dispatcher->addListener('__exec_command', $binary);
|
||||
if ($output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) {
|
||||
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
||||
}
|
||||
|
||||
// If the CWD was modified, we restore it to what it was initially, as it was
|
||||
// most likely modified by the global command, and we want exec to run in the local working directory
|
||||
|
|
|
@ -226,7 +226,8 @@ class EventDispatcher
|
|||
$exec = $callable . ($args === '' ? '' : ' '.$args);
|
||||
if ($this->io->isVerbose()) {
|
||||
$this->io->writeError(sprintf('> %s: %s', $event->getName(), $exec));
|
||||
} else {
|
||||
} elseif ($event->getName() !== '__exec_command') {
|
||||
// do not output the command being run when using `composer exec` as it is fairly obvious the user is running it
|
||||
$this->io->writeError(sprintf('> %s', $exec));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue