Add the type option
This commit is contained in:
parent
1907dde82f
commit
4906322e41
1 changed files with 12 additions and 1 deletions
13
versa
13
versa
|
@ -7,7 +7,18 @@ use Symfony\Component\Console\SingleCommandApplication;
|
||||||
|
|
||||||
$application = new SingleCommandApplication();
|
$application = new SingleCommandApplication();
|
||||||
|
|
||||||
$application->setCode(function (): int {
|
$application->addOption(
|
||||||
|
name: 'type',
|
||||||
|
mode: InputArgument::OPTIONAL,
|
||||||
|
description: 'The project type',
|
||||||
|
suggestedValues: ['drupal', 'sculpin'],
|
||||||
|
);
|
||||||
|
|
||||||
|
$application->setCode(function (InputInterface $input): int {
|
||||||
|
dd(
|
||||||
|
$input->getOption('type'),
|
||||||
|
);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue