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));
|
$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) {
|
||||||
|
|
Loading…
Reference in New Issue