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');
|
$disablePlugins = $input->hasParameterOption('--no-plugins');
|
||||||
$composer = $this->getComposer(false, $disablePlugins);
|
$composer = $this->getComposer(false, $disablePlugins);
|
||||||
if (null === $composer) {
|
if (null === $composer) {
|
||||||
$composer = Factory::createGlobal($this->getIO(), false);
|
$composer = Factory::createGlobal($this->getIO(), $disablePlugins);
|
||||||
}
|
}
|
||||||
if ($composer) {
|
if ($composer) {
|
||||||
$preCommandRunEvent = new PreCommandRunEvent(PluginEvents::PRE_COMMAND_RUN, $input, $this->getName());
|
$preCommandRunEvent = new PreCommandRunEvent(PluginEvents::PRE_COMMAND_RUN, $input, $this->getName());
|
||||||
|
|
|
@ -60,7 +60,7 @@ EOT
|
||||||
$platformRepo = new PlatformRepository;
|
$platformRepo = new PlatformRepository;
|
||||||
$io = $this->getIO();
|
$io = $this->getIO();
|
||||||
if (!($composer = $this->getComposer(false))) {
|
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();
|
$localRepo = $composer->getRepositoryManager()->getLocalRepository();
|
||||||
$installedRepo = new CompositeRepository(array($localRepo, $platformRepo));
|
$installedRepo = new CompositeRepository(array($localRepo, $platformRepo));
|
||||||
|
|
|
@ -89,7 +89,7 @@ EOT
|
||||||
list($errors, $publishErrors, $warnings) = $validator->validate($file, $checkAll);
|
list($errors, $publishErrors, $warnings) = $validator->validate($file, $checkAll);
|
||||||
|
|
||||||
$lockErrors = array();
|
$lockErrors = array();
|
||||||
$composer = Factory::create($io, $file);
|
$composer = Factory::create($io, $file, $input->hasParameterOption('--no-plugins'));
|
||||||
$locker = $composer->getLocker();
|
$locker = $composer->getLocker();
|
||||||
if ($locker->isLocked() && !$locker->isFresh()) {
|
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`.';
|
$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