enable option '--no-interaction' for db:convert-type

Signed-off-by: Bernhard Ostertag <bernieo.code@gmx.de>
This commit is contained in:
Bernhard Ostertag 2019-12-27 07:50:30 +01:00
parent a0d786769d
commit fe0e47bf5e
No known key found for this signature in database
GPG Key ID: 7D99DC27B1B6030E
1 changed files with 7 additions and 5 deletions

View File

@ -212,12 +212,14 @@ class ConvertType extends Command implements CompletionAwareInterface {
$output->writeln('<comment>can be included by specifying the --all-apps option.</comment>');
}
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
$question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', false);
if ($input->isInteractive()) {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
$question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', false);
if (!$helper->ask($input, $output, $question)) {
return;
if (!$helper->ask($input, $output, $question)) {
return;
}
}
}
$intersectingTables = array_intersect($toTables, $fromTables);