Эх сурвалжийг харах

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

Jordi Boggiano 7 жил өмнө
parent
commit
d73aef5c8a

+ 2 - 1
src/Composer/Command/BaseCommand.php

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