Skip to content

Commit 2ec8feb

Browse files
committed
Merge branch '2.6'
2 parents 4e5be9e + 9522562 commit 2ec8feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Composer/Factory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ public function createComposer(IOInterface $io, $localConfig = null, $disablePlu
350350
// load auth configs into the IO instance
351351
$io->loadConfiguration($config);
352352

353-
// load existing Composer\InstalledVersions instance if available
354-
if (!class_exists('Composer\InstalledVersions', false) && file_exists($installedVersionsPath = $config->get('vendor-dir').'/composer/InstalledVersions.php')) {
353+
// load existing Composer\InstalledVersions instance if available and scripts/plugins are allowed, as they might need it
354+
if (!$disablePlugins && !$disableScripts && !class_exists('Composer\InstalledVersions', false) && file_exists($installedVersionsPath = $config->get('vendor-dir').'/composer/InstalledVersions.php')) {
355355
include $installedVersionsPath;
356356
}
357357
}

0 commit comments

Comments
 (0)