protected function execute(InputInterface $input, OutputInterface $output)
{
$application = $this->getApplication();
$config = $application->getConfig();
$global = false;
if ($input->hasOption('global')) {
$global = $input->getOption('global');
}
$project = $input->getOption('project');
if ($global && $project) {
throw new \Exception('Options `project` and `global` can not used in combination.');
}
if (!$global && (!$project || !in_array($project, $this->projects))) {
throw new \Exception(sprintf('You must provide a valid project value (%s)', implode(',', $this->projects)));
}
$override = false;
if ($input->hasOption('override')) {
$override = $input->getOption('override');
}
if ($global) {
$this->copyHomeDirectory($output, $config, $override);
}
if (!$global) {
$this->copyCurrentDirectory($output, $config, $override, $project);
}
}