Merge pull request #447 from astina-forks/populate_interactive_fix

Populate command: use isInteractive() instead of option
This commit is contained in:
Tim Nagel 2014-02-19 13:46:09 +11:00
commit efc1794d3f

View file

@ -67,10 +67,9 @@ class PopulateCommand extends ContainerAwareCommand
$index = $input->getOption('index');
$type = $input->getOption('type');
$reset = $input->getOption('no-reset') ? false : true;
$noInteraction = $input->getOption('no-interaction');
$options = $input->getOptions();
if (!$noInteraction && $reset && $input->getOption('offset')) {
if ($input->isInteractive() && $reset && $input->getOption('offset')) {
/** @var DialogHelper $dialog */
$dialog = $this->getHelperSet()->get('dialog');
if (!$dialog->askConfirmation($output, '<question>You chose to reset the index and start indexing with an offset. Do you really want to do that?</question>', true)) {