From dfc278c814939e6410994cf155ecce9404a6937e Mon Sep 17 00:00:00 2001 From: Daniel Sturm <384815+dsturm@users.noreply.github.com> Date: Tue, 2 Sep 2025 10:20:08 +0200 Subject: [PATCH] Add --format option to fix --json option with WP-CLI --- .../Acorn/Console/Commands/AboutCommand.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Roots/Acorn/Console/Commands/AboutCommand.php b/src/Roots/Acorn/Console/Commands/AboutCommand.php index 7fcbbfa8..815b26da 100644 --- a/src/Roots/Acorn/Console/Commands/AboutCommand.php +++ b/src/Roots/Acorn/Console/Commands/AboutCommand.php @@ -10,6 +10,29 @@ class AboutCommand extends BaseCommand { + /** + * The console command signature. + * + * @var string + */ + protected $signature = 'about {--only= : The section to display} + {--json : Output the information as JSON} + {--format= : The output format (table, json)}'; + + /** + * Execute the console command. + * + * @return int + */ + public function handle() + { + if ($this->option('format') === 'json') { + $this->input->setOption('json', true); + } + + return parent::handle(); + } + protected function gatherApplicationInformation() { parent::gatherApplicationInformation();