Skip to content

Commit

Permalink
CLI-1406: Command documentation markup
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 21, 2024
1 parent 10027cb commit 1b78ba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Command/Self/MakeDocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Acquia\Cli\Command\CommandBase;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\DescriptorHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand All @@ -19,7 +20,7 @@ final class MakeDocsCommand extends CommandBase
protected function configure(): void
{
$this->addOption('format', 'f', InputOption::VALUE_OPTIONAL, 'The format to describe the docs in.', 'rst');
$this->addOption('dump', 'd', InputOption::VALUE_OPTIONAL, 'Dump docs to directory');
$this->addOption('dump', 'd', InputOption::VALUE_OPTIONAL, 'Dump docs to directory (implies JSON format)');
}

protected function execute(InputInterface $input, OutputInterface $output): int
Expand All @@ -46,6 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
continue;
}
$filename = $command['name'] . '.json';
$command['help'] = (new OutputFormatter())->format($command['help']);

Check warning on line 50 in src/Command/Self/MakeDocsCommand.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Self/MakeDocsCommand.php#L50

Added line #L50 was not covered by tests
$index[] = [
'command' => $command['name'],
'help' => $command['help'],
Expand Down

0 comments on commit 1b78ba0

Please sign in to comment.