1
0
Fork 0

Merge pull request #2883 from dzuelke/dev-suggestions

Only print suggestions in dev mode
pull/2888/head
Jordi Boggiano 2014-04-06 00:28:38 +02:00
commit abc34cc62a
1 changed files with 10 additions and 8 deletions

View File

@ -223,16 +223,18 @@ class Installer
}
$this->installationManager->notifyInstalls();
// output suggestions
foreach ($this->suggestedPackages as $suggestion) {
$target = $suggestion['target'];
foreach ($installedRepo->getPackages() as $package) {
if (in_array($target, $package->getNames())) {
continue 2;
// output suggestions if we're in dev mode
if (!$this->devMode) {
foreach ($this->suggestedPackages as $suggestion) {
$target = $suggestion['target'];
foreach ($installedRepo->getPackages() as $package) {
if (in_array($target, $package->getNames())) {
continue 2;
}
}
}
$this->io->write($suggestion['source'].' suggests installing '.$suggestion['target'].' ('.$suggestion['reason'].')');
$this->io->write($suggestion['source'].' suggests installing '.$suggestion['target'].' ('.$suggestion['reason'].')');
}
}
if (!$this->dryRun) {