Skip to content

Commit

Permalink
EZP-31114: Added "skip-indexing" option for install command (#2848)
Browse files Browse the repository at this point in the history
* added disable-index option for install command

* better naming
  • Loading branch information
ilukac authored and lserwatka committed Nov 8, 2019
1 parent c8a553b commit 22ec60a
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down Expand Up @@ -61,6 +62,12 @@ protected function configure()
InputArgument::REQUIRED,
'The type of install. Available options: ' . implode(', ', array_keys($this->installers))
);
$this->addOption(
'skip-indexing',
null,
InputOption::VALUE_NONE,
'Skip indexing (ezplaform:reindex)'
);
}

protected function execute(InputInterface $input, OutputInterface $output)
Expand All @@ -86,7 +93,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
$installer->importData();
$installer->importBinaries();
$this->cacheClear($output);
$this->indexData($output);

if (!$input->getOption('skip-indexing')) {
$this->indexData($output);
}
}

private function checkPermissions()
Expand Down

0 comments on commit 22ec60a

Please sign in to comment.