Skip to content

Commit 65de001

Browse files
committed
Don't print if stdout is empty
1 parent c643653 commit 65de001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DB_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public function query( $args, $assoc_args ) {
526526
$output_lines = explode( "\n", trim( $stdout ) );
527527
$affected_rows = (int) trim( end( $output_lines ) );
528528
WP_CLI::success( "Query succeeded. Rows affected: {$affected_rows}" );
529-
} else {
529+
} else if ( ! empty( $stdout ) ) {
530530
WP_CLI::line( $stdout );
531531
}
532532
}

0 commit comments

Comments
 (0)