Fix --no-plugins not working in certain edge cases
parent
73f14c0c7c
commit
0fdf746ebe
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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`.';
|
||||
|
|
Loading…
Reference in New Issue