Skip to content

Commit f5794f5

Browse files
committed
Add further debugging information
1 parent 5c1272d commit f5794f5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/DB_Command.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public function check( $_, $assoc_args ) {
227227

228228
$command = sprintf( '/usr/bin/env mysqlcheck%s %s', $this->get_defaults_flag_string( $assoc_args ), '%s' );
229229
WP_CLI::debug( "Running shell command: {$command}", 'db' );
230+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
230231

231232
$assoc_args['check'] = true;
232233
self::run(
@@ -270,6 +271,7 @@ public function optimize( $_, $assoc_args ) {
270271

271272
$command = sprintf( '/usr/bin/env mysqlcheck%s %s', $this->get_defaults_flag_string( $assoc_args ), '%s' );
272273
WP_CLI::debug( "Running shell command: {$command}", 'db' );
274+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
273275

274276
$assoc_args['optimize'] = true;
275277
self::run(
@@ -313,6 +315,7 @@ public function repair( $_, $assoc_args ) {
313315

314316
$command = sprintf( '/usr/bin/env mysqlcheck%s %s', $this->get_defaults_flag_string( $assoc_args ), '%s' );
315317
WP_CLI::debug( "Running shell command: {$command}", 'db' );
318+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
316319

317320
$assoc_args['repair'] = true;
318321
self::run(
@@ -354,10 +357,11 @@ public function repair( $_, $assoc_args ) {
354357
*
355358
* @alias connect
356359
*/
357-
public function cli( $args, $assoc_args ) {
360+
public function cli( $_, $assoc_args ) {
358361

359362
$command = sprintf( '/usr/bin/env mysql%s --no-auto-rehash', $this->get_defaults_flag_string( $assoc_args ) );
360363
WP_CLI::debug( "Running shell command: {$command}", 'db' );
364+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
361365

362366
if ( ! isset( $assoc_args['database'] ) ) {
363367
$assoc_args['database'] = DB_NAME;
@@ -423,6 +427,7 @@ public function query( $args, $assoc_args ) {
423427

424428
$command = sprintf( '/usr/bin/env mysql%s --no-auto-rehash', $this->get_defaults_flag_string( $assoc_args ) );
425429
WP_CLI::debug( "Running shell command: {$command}", 'db' );
430+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
426431

427432
$assoc_args['database'] = DB_NAME;
428433

@@ -558,6 +563,7 @@ public function export( $args, $assoc_args ) {
558563

559564
$initial_command = sprintf( '/usr/bin/env mysqldump%s ', $this->get_defaults_flag_string( $assoc_args ) );
560565
WP_CLI::debug( "Running initial shell command: {$initial_command}", 'db' );
566+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
561567

562568
if ( $support_column_statistics ) {
563569
$command = $initial_command . '--skip-column-statistics %s';
@@ -666,6 +672,7 @@ public function import( $args, $assoc_args ) {
666672

667673
$command = sprintf( '/usr/bin/env mysql%s --no-auto-rehash', $this->get_defaults_flag_string( $assoc_args ) );
668674
WP_CLI::debug( "Running shell command: {$command}", 'db' );
675+
WP_CLI::debug( 'Associative arguments: ' . json_encode( $assoc_args ), 'db' );
669676

670677
self::run( $command, $mysql_args );
671678

0 commit comments

Comments
 (0)