1
0
Fork 0

Respect --no-plugins flag when firing pre-command-run event

pull/7495/head
Jordi Boggiano 2018-07-25 10:22:05 +02:00
parent 8eae15182c
commit d73aef5c8a
1 changed files with 2 additions and 1 deletions

View File

@ -127,7 +127,8 @@ abstract class BaseCommand extends Command
protected function initialize(InputInterface $input, OutputInterface $output)
{
// initialize a plugin-enabled Composer instance, either local or global
$composer = $this->getComposer(false, false);
$disablePlugins = $input->hasParameterOption('--no-plugins');
$composer = $this->getComposer(false, $disablePlugins);
if (null === $composer) {
$composer = Factory::createGlobal($this->getIO(), false);
}