Merge pull request #18576 from BernieO/bernieo-convertInteractive

enable option '--no-interaction' for db:convert-type
This commit is contained in:
Christoph Wurst 2020-01-07 15:54:06 +01:00 committed by GitHub
commit 4defd0419a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -212,9 +212,11 @@ class ConvertType extends Command implements CompletionAwareInterface {
$output->writeln('<comment>can be included by specifying the --all-apps option.</comment>');
}
$continueConversion = !$input->isInteractive(); // assume yes for --no-interaction and no otherwise.
$question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', $continueConversion);
/** @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;