Avoid index reset error in case of unexistant index
This commit is contained in:
parent
5e54dcd955
commit
a121a77774
|
@ -107,7 +107,7 @@ class PopulateCommand extends ContainerAwareCommand
|
||||||
*/
|
*/
|
||||||
private function populateIndex(OutputInterface $output, $index, $reset, $options)
|
private function populateIndex(OutputInterface $output, $index, $reset, $options)
|
||||||
{
|
{
|
||||||
if ($reset) {
|
if ($reset && $this->indexManager->getIndex($index)->exists()) {
|
||||||
$output->writeln(sprintf('<info>Resetting</info> <comment>%s</comment>', $index));
|
$output->writeln(sprintf('<info>Resetting</info> <comment>%s</comment>', $index));
|
||||||
$this->resetter->resetIndex($index);
|
$this->resetter->resetIndex($index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue