protected function execute(InputInterface $input, OutputInterface $output)
{
$this->detectMagento($output, true);
if (false === $this->initMagento()) {
throw new RuntimeException('Magento could not be loaded');
}
$this->config = \Mage::getConfig();
$this->modulesDir = $this->config->getOptions()->getEtcDir() . DS . 'modules' . DS;
if ($codePool = $input->getOption('codepool')) {
$output->writeln('<info>' . ($this->commandName == 'enable' ? 'Enabling' : 'Disabling') . ' modules in <comment>' . $codePool . '</comment> codePool...</info>');
$this->enableCodePool($codePool, $output);
} elseif ($module = $input->getArgument('moduleName')) {
$this->enableModule($module, $output);
} else {
throw new InvalidArgumentException('No code-pool option nor module-name argument');
}
}