1
0
Fork 0

Add warning in show command if no dependencies are installed but the root package has dependencies, fixes #6820

pull/6875/head
Jordi Boggiano 2017-11-30 15:55:57 +01:00
parent 5ba6d7d436
commit 5960f715f0
1 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,10 @@ EOT
$repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos)); $repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos));
} else { } else {
$repos = $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository(); $repos = $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository();
$rootPkg = $this->getComposer()->getPackage();
if (!$installedRepo->getPackages() && ($rootPkg->getRequires() || $rootPkg->getDevRequires())) {
$io->writeError('<warning>No dependencies installed. Try running composer install or update.</warning>');
}
} }
if ($composer) { if ($composer) {