From d73aef5c8a8cb9f1cb7f707e27cbf45f3411c838 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 25 Jul 2018 10:22:05 +0200 Subject: [PATCH] Respect --no-plugins flag when firing pre-command-run event --- src/Composer/Command/BaseCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Command/BaseCommand.php b/src/Composer/Command/BaseCommand.php index bd7c8a9fb..19d80aec4 100644 --- a/src/Composer/Command/BaseCommand.php +++ b/src/Composer/Command/BaseCommand.php @@ -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); }