Show proper repo information and not always the default ones
parent
8ac4b649c3
commit
518253e150
|
@ -82,14 +82,20 @@ EOT
|
|||
$repos = $installedRepo = $getRepositories($this->getComposer(), $input->getOption('dev'));
|
||||
} elseif ($input->getOption('available')) {
|
||||
$installedRepo = $platformRepo;
|
||||
$repos = new CompositeRepository(Factory::createDefaultRepositories($this->getIO()));
|
||||
if ($composer = $this->getComposer(false)) {
|
||||
$repos = new CompositeRepository($composer->getRepositoryManager()->getRepositories());
|
||||
} else {
|
||||
$defaultRepos = Factory::createDefaultRepositories($this->getIO());
|
||||
$repos = new CompositeRepository($defaultRepos);
|
||||
$output->writeln('No composer.json found in the current directory, showing available packages from ' . implode(', ', array_keys($defaultRepos)));
|
||||
}
|
||||
} elseif ($composer = $this->getComposer(false)) {
|
||||
$localRepo = $getRepositories($composer, $input->getOption('dev'));
|
||||
$installedRepo = new CompositeRepository(array($localRepo, $platformRepo));
|
||||
$repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories()));
|
||||
} else {
|
||||
$defaultRepos = Factory::createDefaultRepositories($this->getIO());
|
||||
$output->writeln('No composer.json found in the current directory, showing packages from ' . implode(', ', array_keys($defaultRepos)));
|
||||
$output->writeln('No composer.json found in the current directory, showing available packages from ' . implode(', ', array_keys($defaultRepos)));
|
||||
$installedRepo = $platformRepo;
|
||||
$repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue