protected function execute(InputInterface $input, OutputInterface $output)
{
$this->chooseInstallationFolder($input, $output);
$this->detectMagento($output);
$this->getApplication()->setAutoExit(false);
/* @var $dialog DialogHelper */
$dialog = $this->getHelper('dialog');
$shouldUninstall = $input->getOption('force');
if (!$shouldUninstall) {
$shouldUninstall = $dialog->askConfirmation($output, '<question>Really uninstall ?</question> <comment>[n]</comment>: ', false);
}
if ($shouldUninstall) {
$input = new StringInput('db:drop --force');
$this->getApplication()->run($input, $output);
$fileSystem = new Filesystem();
$output->writeln('<info>Remove directory </info><comment>' . $this->_magentoRootFolder . '</comment>');
try {
$fileSystem->recursiveRemoveDirectory($this->_magentoRootFolder);
} catch (Exception $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
}
$output->writeln('<info>Done</info>');
}
}