diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Db/ConvertType.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 8b6f2b10c75..3c5d62aa4bd 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -212,14 +212,14 @@ class ConvertType extends Command implements CompletionAwareInterface { $output->writeln('<comment>can be included by specifying the --all-apps option.</comment>'); } - if ($input->isInteractive()) { - /** @var QuestionHelper $helper */ - $helper = $this->getHelper('question'); - $question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', false); + $continueConversion = !$input->isInteractive(); // assume yes for --no-interaction and no otherwise. + $question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', $continueConversion); - if (!$helper->ask($input, $output, $question)) { - return; - } + /** @var QuestionHelper $helper */ + $helper = $this->getHelper('question'); + + if (!$helper->ask($input, $output, $question)) { + return; } } $intersectingTables = array_intersect($toTables, $fromTables); |