Fix output colors

This commit is contained in:
Antonio J. García Lagar 2013-06-18 09:52:44 +02:00
parent 9d5a0c2ed9
commit 0bf6e0b09a
2 changed files with 4 additions and 4 deletions

View file

@ -125,18 +125,18 @@ class PopulateCommand extends ContainerAwareCommand
private function populateIndexType(OutputInterface $output, $index, $type, $reset)
{
if ($reset) {
$output->writeln(sprintf('Resetting: %s/%s', $index, $type));
$output->writeln(sprintf('<info>Resetting</info> <comment>%s/%s</comment>', $index, $type));
$this->resetter->resetIndexType($index, $type);
}
$loggerClosure = function($message) use ($output, $index, $type) {
$output->writeln(sprintf('Populating: %s/%s, %s', $index, $type, $message));
$output->writeln(sprintf('<info>Populating</info> %s/%s, %s', $index, $type, $message));
};
$provider = $this->providerRegistry->getProvider($index, $type);
$provider->populate($loggerClosure);
$output->writeln(sprintf('Refreshing: %s', $index));
$output->writeln(sprintf('<info>Refreshing</info> <comment>%s</comment>', $index));
$this->indexManager->getIndex($index)->refresh();
}
}

View file

@ -61,7 +61,7 @@ class ResetCommand extends ContainerAwareCommand
}
if (null !== $type) {
$output->writeln(sprintf('Resetting: %s/%s', $index, $type));
$output->writeln(sprintf('<info>Resetting</info> <comment>%s/%s</comment>', $index, $type));
$this->resetter->resetIndex($index, $type);
} else {
$indexes = null === $index