1
0
Fork 0

Only include installed versions class when plugins and scripts are allowed, as it is not needed otherwise

pull/11829/head
Jordi Boggiano 2024-01-26 17:11:16 +01:00
parent 75fd2bbeb2
commit 952256247c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -350,8 +350,8 @@ class Factory
// load auth configs into the IO instance
$io->loadConfiguration($config);
// load existing Composer\InstalledVersions instance if available
if (!class_exists('Composer\InstalledVersions', false) && file_exists($installedVersionsPath = $config->get('vendor-dir').'/composer/InstalledVersions.php')) {
// load existing Composer\InstalledVersions instance if available and scripts/plugins are allowed, as they might need it
if (!$disablePlugins && !$disableScripts && !class_exists('Composer\InstalledVersions', false) && file_exists($installedVersionsPath = $config->get('vendor-dir').'/composer/InstalledVersions.php')) {
include $installedVersionsPath;
}
}