Skip to content

Commit 8bb7125

Browse files
Copilotswissspidy
andcommitted
Add error check when commands are not found in cmd_dump
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent f036a2b commit 8bb7125

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

features/scaffold-package-readme.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ Feature: Scaffold a README.md file for an existing package
294294
*This README.md is generated dynamically from the project's codebase
295295
"""
296296

297-
@broken
298297
Scenario: Error when commands are specified but not present
299298
Given an empty directory
300299
And a foo/composer.json file:

src/ScaffoldPackageCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,9 @@ public function package_readme( $args, $assoc_args ) {
332332
}
333333
} while ( $parent_command && $bits );
334334

335-
/* This check doesn't work because of the way the commands are fetched.
336-
* Needs bigger refactor to put this check back in.
337335
if ( empty( $parent_command ) ) {
338336
WP_CLI::error( 'Missing one or more commands defined in composer.json -> extra -> commands.' );
339337
}
340-
*/
341338

342339
$longdesc = isset( $parent_command['longdesc'] ) ? $parent_command['longdesc'] : '';
343340
$longdesc = (string) preg_replace( '/## GLOBAL PARAMETERS(.+)/s', '', $longdesc );

0 commit comments

Comments
 (0)