diff --git a/src/Composer/Command/ExecCommand.php b/src/Composer/Command/ExecCommand.php index fba9e7e8a..167a2be0d 100644 --- a/src/Composer/Command/ExecCommand.php +++ b/src/Composer/Command/ExecCommand.php @@ -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 diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 882b160e2..9264d7f4a 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -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)); }