Fix show --locked to avoid listing all the things
parent
da1357c663
commit
e7d99c37b3
|
@ -196,8 +196,7 @@ EOT
|
||||||
}
|
}
|
||||||
$locker = $composer->getLocker();
|
$locker = $composer->getLocker();
|
||||||
$lockedRepo = $locker->getLockedRepository(true);
|
$lockedRepo = $locker->getLockedRepository(true);
|
||||||
$installedRepo = new InstalledRepository(array($lockedRepo));
|
$repos = $installedRepo = new InstalledRepository(array($lockedRepo));
|
||||||
$repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories()));
|
|
||||||
} else {
|
} else {
|
||||||
// --installed / default case
|
// --installed / default case
|
||||||
if (!$composer) {
|
if (!$composer) {
|
||||||
|
@ -349,7 +348,7 @@ EOT
|
||||||
foreach ($repos as $repo) {
|
foreach ($repos as $repo) {
|
||||||
if ($repo === $platformRepo) {
|
if ($repo === $platformRepo) {
|
||||||
$type = 'platform';
|
$type = 'platform';
|
||||||
} elseif($lockedRepo !== null && $repo === $lockedRepo) {
|
} elseif ($lockedRepo !== null && $repo === $lockedRepo) {
|
||||||
$type = 'locked';
|
$type = 'locked';
|
||||||
} elseif ($repo === $installedRepo || in_array($repo, $installedRepo->getRepositories(), true)) {
|
} elseif ($repo === $installedRepo || in_array($repo, $installedRepo->getRepositories(), true)) {
|
||||||
$type = 'installed';
|
$type = 'installed';
|
||||||
|
|
Loading…
Reference in New Issue