[upgrade] print update message before running the update code
* otherwise you don't know during which app update something failed
This commit is contained in:
parent
2654696086
commit
1ba9fd3ada
|
@ -158,6 +158,9 @@ class Upgrade extends Command {
|
|||
$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) {
|
||||
$output->writeln('<info>Checked database schema update for apps</info>');
|
||||
});
|
||||
$updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) {
|
||||
$output->writeln("<info>Updating <$app> ...</info>");
|
||||
});
|
||||
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) {
|
||||
$output->writeln("<info>Updated <$app> to $version</info>");
|
||||
});
|
||||
|
|
|
@ -386,6 +386,7 @@ class Updater extends BasicEmitter {
|
|||
foreach ($stacks as $type => $stack) {
|
||||
foreach ($stack as $appId) {
|
||||
if (\OC_App::shouldUpgrade($appId)) {
|
||||
$this->emit('\OC\Updater', 'appUpgradeStarted', array($appId, \OC_App::getAppVersion($appId)));
|
||||
\OC_App::updateApp($appId);
|
||||
$this->emit('\OC\Updater', 'appUpgrade', array($appId, \OC_App::getAppVersion($appId)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue