diff --git a/src/Composer/Command/BaseCommand.php b/src/Composer/Command/BaseCommand.php index 19d80aec4..d6b014d7d 100644 --- a/src/Composer/Command/BaseCommand.php +++ b/src/Composer/Command/BaseCommand.php @@ -130,7 +130,7 @@ abstract class BaseCommand extends Command $disablePlugins = $input->hasParameterOption('--no-plugins'); $composer = $this->getComposer(false, $disablePlugins); if (null === $composer) { - $composer = Factory::createGlobal($this->getIO(), false); + $composer = Factory::createGlobal($this->getIO(), $disablePlugins); } if ($composer) { $preCommandRunEvent = new PreCommandRunEvent(PluginEvents::PRE_COMMAND_RUN, $input, $this->getName()); diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index 8fa6b02b7..ed180e84c 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -60,7 +60,7 @@ EOT $platformRepo = new PlatformRepository; $io = $this->getIO(); if (!($composer = $this->getComposer(false))) { - $composer = Factory::create($this->getIO(), array()); + $composer = Factory::create($this->getIO(), array(), $input->hasParameterOption('--no-plugins')); } $localRepo = $composer->getRepositoryManager()->getLocalRepository(); $installedRepo = new CompositeRepository(array($localRepo, $platformRepo)); diff --git a/src/Composer/Command/ValidateCommand.php b/src/Composer/Command/ValidateCommand.php index d884febe8..52bba1838 100644 --- a/src/Composer/Command/ValidateCommand.php +++ b/src/Composer/Command/ValidateCommand.php @@ -89,7 +89,7 @@ EOT list($errors, $publishErrors, $warnings) = $validator->validate($file, $checkAll); $lockErrors = array(); - $composer = Factory::create($io, $file); + $composer = Factory::create($io, $file, $input->hasParameterOption('--no-plugins')); $locker = $composer->getLocker(); if ($locker->isLocked() && !$locker->isFresh()) { $lockErrors[] = 'The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.';