mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
[upgrade] add verbosity check and show repair info & steps
This commit is contained in:
parent
ceb80ac123
commit
5ff536b45a
2 changed files with 15 additions and 0 deletions
|
|
@ -168,6 +168,15 @@ class Upgrade extends Command {
|
|||
$output->writeln("<error>$message</error>");
|
||||
});
|
||||
|
||||
if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
|
||||
$updater->listen('\OC\Updater', 'repairInfo', function ($message) use($output) {
|
||||
$output->writeln('<info>Repair info: ' . $message . '</info>');
|
||||
});
|
||||
$updater->listen('\OC\Updater', 'repairStep', function ($message) use($output) {
|
||||
$output->writeln('<info>Repair step: ' . $message . '</info>');
|
||||
});
|
||||
}
|
||||
|
||||
$success = $updater->upgrade();
|
||||
|
||||
$this->postUpgradeCheck($input, $output);
|
||||
|
|
|
|||
|
|
@ -238,6 +238,12 @@ class Updater extends BasicEmitter {
|
|||
$repair->listen('\OC\Repair', 'error', function ($description) {
|
||||
$this->emit('\OC\Updater', 'repairError', array($description));
|
||||
});
|
||||
$repair->listen('\OC\Repair', 'info', function ($description) {
|
||||
$this->emit('\OC\Updater', 'repairInfo', array($description));
|
||||
});
|
||||
$repair->listen('\OC\Repair', 'step', function ($description) {
|
||||
$this->emit('\OC\Updater', 'repairStep', array($description));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue