From a121a777743525f46c65dc29d983c8eb92720664 Mon Sep 17 00:00:00 2001 From: Fabien Somnier Date: Mon, 3 Feb 2014 17:50:35 +0100 Subject: [PATCH] Avoid index reset error in case of unexistant index --- Command/PopulateCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command/PopulateCommand.php b/Command/PopulateCommand.php index 7297523..9d00db1 100755 --- a/Command/PopulateCommand.php +++ b/Command/PopulateCommand.php @@ -107,7 +107,7 @@ class PopulateCommand extends ContainerAwareCommand */ private function populateIndex(OutputInterface $output, $index, $reset, $options) { - if ($reset) { + if ($reset && $this->indexManager->getIndex($index)->exists()) { $output->writeln(sprintf('Resetting %s', $index)); $this->resetter->resetIndex($index); }