diff --git a/src/Command/Self/MakeDocsCommand.php b/src/Command/Self/MakeDocsCommand.php index c37b562a5..0918829e6 100644 --- a/src/Command/Self/MakeDocsCommand.php +++ b/src/Command/Self/MakeDocsCommand.php @@ -6,6 +6,7 @@ use Acquia\Cli\Attribute\RequireAuth; use Acquia\Cli\Command\CommandBase; +use Composer\Console\Input\InputOption; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\DescriptorHelper; @@ -16,11 +17,15 @@ #[AsCommand(name: 'self:make-docs', description: 'Generate documentation for all ACLI commands', hidden: TRUE)] final class MakeDocsCommand extends CommandBase { + protected function configure(): void { + $this->addOption('format', 'f', InputOption::VALUE_OPTIONAL, 'The format to describe the docs in.', 'rst'); + } + protected function execute(InputInterface $input, OutputInterface $output): int { $helper = new DescriptorHelper(); $helper->describe($output, $this->getApplication(), [ - 'format' => 'rst', + 'format' => $input->getOption('format'), ]); return Command::SUCCESS;