diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-01-07 15:54:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 15:54:06 +0100 |
commit | 4defd0419a20c55f5c294d4cf1b2dd7972c26006 (patch) | |
tree | ed8e55a1659bbca8352d44dc7ab9f9c7bc416260 /core/Command | |
parent | 52e4ecd66e2269dd47f2fa7b9e99babc96308713 (diff) | |
parent | 6a017eb205c6c37d01d76495e2084f5e1ff4fd17 (diff) | |
download | nextcloud-server-4defd0419a20c55f5c294d4cf1b2dd7972c26006.tar.gz nextcloud-server-4defd0419a20c55f5c294d4cf1b2dd7972c26006.zip |
Merge pull request #18576 from BernieO/bernieo-convertInteractive
enable option '--no-interaction' for db:convert-type
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Db/ConvertType.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 37f94f9be7c..3c5d62aa4bd 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -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; |