protected function execute(InputInterface $input, OutputInterface $output)
{
$initialized = false;
try {
$this->detectMagento($output);
$initialized = $this->initMagento();
} catch (Exception $e) {
// do nothing
}
$consoleOutput = new ShellOutput();
$config = new Configuration();
$shell = new Shell($config);
if ($initialized) {
$ok = Charset::convertInteger(Charset::UNICODE_CHECKMARK_CHAR);
$edition = $this->getApplication()->isMagentoEnterprise() ? 'EE' : 'CE';
$consoleOutput->writeln('<fg=black;bg=green>Magento ' . \Mage::getVersion() . ' ' . $edition . ' initialized.</fg=black;bg=green> ' . $ok);
} else {
$consoleOutput->writeln('<fg=black;bg=yellow>Magento is not initialized.</fg=black;bg=yellow>');
}
$help = <<<'help'
At the prompt, type <comment>help</comment> for some help.
To exit the shell, type <comment>^D</comment>.
help;
$consoleOutput->writeln($help);
$shell->run($input, $consoleOutput);
}