summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-13 11:04:02 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-13 11:04:02 +0200
commit3891cd9068596481cf1717e9b1a5bcae1cc0ce09 (patch)
tree06b3d0a75436bddbc87a2c85bbfa2c308ac181f5 /core
parent1cb4f1080a57bfffe5d71d7496b61184434ff84d (diff)
parent4cb5970947f915c801a6748ad26898831ed3b4c1 (diff)
downloadnextcloud-server-3891cd9068596481cf1717e9b1a5bcae1cc0ce09.tar.gz
nextcloud-server-3891cd9068596481cf1717e9b1a5bcae1cc0ce09.zip
Merge pull request #19677 from owncloud/silently-fail-app-upgrade-exceptions-master
Silently fail app upgrade exceptions
Diffstat (limited to 'core')
-rw-r--r--core/command/upgrade.php14
-rw-r--r--core/register_command.php2
2 files changed, 10 insertions, 6 deletions
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 0f1b828ba25..5d4819f6baf 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -30,6 +30,7 @@ namespace OC\Core\Command;
use OC\Console\TimestampFormatter;
use OC\Updater;
use OCP\IConfig;
+use OCP\ILogger;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -44,17 +45,19 @@ class Upgrade extends Command {
const ERROR_INVALID_ARGUMENTS = 4;
const ERROR_FAILURE = 5;
- /**
- * @var IConfig
- */
+ /** @var IConfig */
private $config;
+ /** @var ILogger */
+ private $logger;
+
/**
* @param IConfig $config
*/
- public function __construct(IConfig $config) {
+ public function __construct(IConfig $config, ILogger $logger) {
parent::__construct();
$this->config = $config;
+ $this->logger = $logger;
}
protected function configure() {
@@ -126,7 +129,8 @@ class Upgrade extends Command {
$self = $this;
$updater = new Updater(\OC::$server->getHTTPHelper(),
- $this->config);
+ $this->config,
+ $this->logger);
$updater->setSimulateStepEnabled($simulateStepEnabled);
$updater->setUpdateStepEnabled($updateStepEnabled);
diff --git a/core/register_command.php b/core/register_command.php
index 460e8626e5e..4044d2d200c 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -94,7 +94,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
$application->add(new OC\Core\Command\Maintenance\Repair(new \OC\Repair(\OC\Repair::getRepairSteps()), \OC::$server->getConfig()));
$application->add(new OC\Core\Command\Maintenance\SingleUser(\OC::$server->getConfig()));
- $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger()));
$application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));