Commit e15f2617 authored by Jon Pugh's avatar Jon Pugh

Adding --target option to Application

parent a60012e3
......@@ -5,6 +5,8 @@ namespace Aegir\Provision;
use Aegir\Provision\Command\SaveCommand;
use Aegir\Provision\Command\ShellCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Application as BaseApplication;
......@@ -56,4 +58,16 @@ class Application extends BaseApplication
$commands[] = new ShellCommand();
return $commands;
}
/**
* {@inheritdoc}
*
* Adds "--target" option.
*/
protected function getDefaultInputDefinition()
{
$inputDefinition = parent::getDefaultInputDefinition();
$inputDefinition->addOption(new InputOption('--target', '-t', InputOption::VALUE_NONE, 'The target context to act on.'));
return $inputDefinition;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment