protected function execute(InputInterface $input, OutputInterface $output)
{
$this->getApplication()->setAutoExit(false);
$this->detectMagento($output);
if (!$this->initMagento()) {
return;
}
try {
if (false === $input->getOption('no-implicit-cache-flush')) {
$this->flushCache();
}
/**
* Put output in buffer. \Mage_Core_Model_Resource_Setup::_modifyResourceDb should print any error
* directly to stdout. Use execption which will be thrown to show error
*/
\ob_start();
\Mage_Core_Model_Resource_Setup::applyAllUpdates();
if (is_callable(array('\\Mage_Core_Model_Resource_Setup', 'applyAllDataUpdates'))) {
\Mage_Core_Model_Resource_Setup::applyAllDataUpdates();
}
\ob_end_clean();
$output->writeln('<info>done</info>');
} catch (Exception $e) {
\ob_end_clean();
$this->printException($output, $e);
$this->printStackTrace($output, $e->getTrace());
$this->printFile($output, $e);
return 1;
// exit with error status
}
}