diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-02-24 15:09:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 15:09:07 +0100 |
commit | fbbdc64167a6bd632e2c34225b8af95d2af3a7f4 (patch) | |
tree | f0783459dcf865a5af6b6c86ea183eeab5f78219 /core | |
parent | 4908d87c249d9fec3fe40ec95e44e50674135f91 (diff) | |
parent | f32804e97defd7f231377117fcbe758ab5cf0239 (diff) | |
download | nextcloud-server-fbbdc64167a6bd632e2c34225b8af95d2af3a7f4.tar.gz nextcloud-server-fbbdc64167a6bd632e2c34225b8af95d2af3a7f4.zip |
Merge pull request #36781 from nextcloud/bugfix/noid/run-repairsteps-against-oraclev26.0.0beta5
fix(CI): Run repair steps against Oracle DB
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Maintenance/Repair.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index 01e62f2cd32..a1d97476f94 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -53,6 +53,7 @@ class Repair extends Command { private ProgressBar $progress; private OutputInterface $output; private IAppManager $appManager; + protected bool $errored = false; public function __construct(\OC\Repair $repair, IConfig $config, IEventDispatcher $dispatcher, IAppManager $appManager) { $this->repair = $repair; @@ -104,6 +105,8 @@ class Repair extends Command { } } + + $maintenanceMode = $this->config->getSystemValueBool('maintenance'); $this->config->setSystemValue('maintenance', true); @@ -120,7 +123,7 @@ class Repair extends Command { $this->repair->run(); $this->config->setSystemValue('maintenance', $maintenanceMode); - return 0; + return $this->errored ? 1 : 0; } public function handleRepairFeedBack(Event $event): void { @@ -139,6 +142,7 @@ class Repair extends Command { $this->output->writeln('<comment> - WARNING: ' . $event->getMessage() . '</comment>'); } elseif ($event instanceof RepairErrorEvent) { $this->output->writeln('<error> - ERROR: ' . $event->getMessage() . '</error>'); + $this->errored = true; } } } |