Add warning in show command if no dependencies are installed but the root package has dependencies, fixes #6820
parent
5ba6d7d436
commit
5960f715f0
|
@ -157,6 +157,10 @@ EOT
|
|||
$repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos));
|
||||
} else {
|
||||
$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) {
|
||||
|
|
Loading…
Reference in New Issue