Skip to content

Commit 20bcbc4

Browse files
Copilotswissspidy
andauthored
Preserve object input semantics for abilities with input schema
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 3b4defa commit 20bcbc4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Ability_Command.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ public function run( $args, $assoc_args ): void {
369369

370370
// Build input data (with stdin support).
371371
$input = $this->build_input_with_stdin( $assoc_args );
372+
if ( null === $input && ! empty( $ability->get_input_schema() ) ) {
373+
$input = [];
374+
}
372375

373376
// Execute the ability.
374377
$result = $ability->execute( $input );

0 commit comments

Comments
 (0)