@@ -260,6 +260,12 @@ public function check( $_, $assoc_args ) {
260260 WP_CLI ::debug ( "Running shell command: {$ command }" , 'db ' );
261261
262262 $ assoc_args ['check ' ] = true ;
263+
264+ // Pass --silent to mysqlcheck when in quiet mode.
265+ if ( WP_CLI ::get_config ( 'quiet ' ) ) {
266+ $ assoc_args ['silent ' ] = true ;
267+ }
268+
263269 self ::run (
264270 Utils \esc_cmd ( $ command , DB_NAME ),
265271 $ assoc_args
@@ -308,6 +314,12 @@ public function optimize( $_, $assoc_args ) {
308314 WP_CLI ::debug ( "Running shell command: {$ command }" , 'db ' );
309315
310316 $ assoc_args ['optimize ' ] = true ;
317+
318+ // Pass --silent to mysqlcheck when in quiet mode.
319+ if ( WP_CLI ::get_config ( 'quiet ' ) ) {
320+ $ assoc_args ['silent ' ] = true ;
321+ }
322+
311323 self ::run (
312324 Utils \esc_cmd ( $ command , DB_NAME ),
313325 $ assoc_args
@@ -356,6 +368,12 @@ public function repair( $_, $assoc_args ) {
356368 WP_CLI ::debug ( "Running shell command: {$ command }" , 'db ' );
357369
358370 $ assoc_args ['repair ' ] = true ;
371+
372+ // Pass --silent to mysqlcheck when in quiet mode.
373+ if ( WP_CLI ::get_config ( 'quiet ' ) ) {
374+ $ assoc_args ['silent ' ] = true ;
375+ }
376+
359377 self ::run (
360378 Utils \esc_cmd ( $ command , DB_NAME ),
361379 $ assoc_args
0 commit comments