Skip to content

Commit c2d222b

Browse files
swissspidyCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 6b11c28 commit c2d222b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/ScaffoldPackageCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,13 @@ public function package_readme( $args, $assoc_args ) {
361361
]
362362
);
363363

364-
if ( ! empty( $cmd_dump->stderr ) || 0 !== $cmd_dump->return_code ) {
364+
if ( 0 !== $cmd_dump->return_code ) {
365365
$cmd_dump = null;
366366
} else {
367367
$cmd_dump = json_decode( $cmd_dump->stdout, true );
368+
if ( JSON_ERROR_NONE !== json_last_error() ) {
369+
$cmd_dump = null;
370+
}
368371
}
369372

370373
/**

0 commit comments

Comments
 (0)