File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -714,9 +714,12 @@ public function import( $args, $assoc_args ) {
714
714
$ result_file = sprintf ( '%s.sql ' , DB_NAME );
715
715
}
716
716
717
- $ mysql_args = [
718
- 'database ' => DB_NAME ,
719
- ];
717
+ // Process options to MySQL.
718
+ $ mysql_args = array_merge (
719
+ [ 'database ' => DB_NAME ],
720
+ self ::get_mysql_args ( $ assoc_args ),
721
+ self ::get_dbuser_dbpass_args ( $ assoc_args )
722
+ );
720
723
721
724
if ( '- ' !== $ result_file ) {
722
725
if ( ! is_readable ( $ result_file ) ) {
@@ -733,8 +736,6 @@ public function import( $args, $assoc_args ) {
733
736
} else {
734
737
$ result_file = 'STDIN ' ;
735
738
}
736
- // Check if any mysql option pass.
737
- $ mysql_args = array_merge ( $ mysql_args , self ::get_mysql_args ( $ assoc_args ) );
738
739
739
740
$ command = sprintf ( '/usr/bin/env mysql%s --no-auto-rehash ' , $ this ->get_defaults_flag_string ( $ assoc_args ) );
740
741
WP_CLI ::debug ( "Running shell command: {$ command }" , 'db ' );
You can’t perform that action at this time.
0 commit comments