diff options
Diffstat (limited to 'core/Command/Encryption/DecryptAll.php')
-rw-r--r-- | core/Command/Encryption/DecryptAll.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 14bf74d8120..51dc74d1eb7 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -125,14 +125,14 @@ class DecryptAll extends Command { ); } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { if (!$input->isInteractive()) { $output->writeln('Invalid TTY.'); $output->writeln('If you are trying to execute the command in a Docker '); $output->writeln("container, do not forget to execute 'docker exec' with"); $output->writeln("the '-i' and '-t' options."); $output->writeln(''); - return; + return 1; } $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); @@ -141,7 +141,7 @@ class DecryptAll extends Command { $output->writeln("in order to load the relevant encryption modules correctly."); $output->writeln("Your instance will automatically be put to maintenance mode"); $output->writeln("during the actual decryption of the files."); - return; + return 1; } try { @@ -151,7 +151,7 @@ class DecryptAll extends Command { $output->writeln('done.'); } else { $output->writeln('Server side encryption not enabled. Nothing to do.'); - return; + return 0; } $uid = $input->getArgument('user'); @@ -181,11 +181,13 @@ class DecryptAll extends Command { $this->config->setAppValue('core', 'encryption_enabled', 'yes'); } $this->resetMaintenanceAndTrashbin(); + return 0; } else { $output->write('Enable server side encryption... '); $this->config->setAppValue('core', 'encryption_enabled', 'yes'); $output->writeln('done.'); $output->writeln('aborted'); + return 1; } } catch (\Exception $e) { // enable server side encryption again if something went wrong |