@@ -1180,13 +1180,10 @@ public function install_wp( $subdir = '' ) {
11801180 ];
11811181
11821182 $ run_dir = '' !== $ subdir ? ( $ this ->variables ['RUN_DIR ' ] . "/ $ subdir " ) : $ this ->variables ['RUN_DIR ' ];
1183- $ install_cache_path = '' ;
11841183
1185- if ( self ::$ install_cache_dir ) {
1186- $ install_cache_path = self ::$ install_cache_dir . '/install_ ' . md5 ( implode ( ': ' , $ install_args ) . ':subdir= ' . $ subdir );
1187- }
1184+ $ install_cache_path = self ::$ install_cache_dir . '/install_ ' . md5 ( implode ( ': ' , $ install_args ) . ':subdir= ' . $ subdir );
11881185
1189- if ( $ install_cache_path && file_exists ( $ install_cache_path ) ) {
1186+ if ( file_exists ( $ install_cache_path ) ) {
11901187 self ::copy_dir ( $ install_cache_path , $ run_dir );
11911188
11921189 // This is the sqlite equivalent of restoring a database dump in MySQL
@@ -1198,26 +1195,24 @@ public function install_wp( $subdir = '' ) {
11981195 } else {
11991196 $ this ->proc ( 'wp core install ' , $ install_args , $ subdir )->run_check ();
12001197
1201- if ( $ install_cache_path ) {
1202- mkdir ( $ install_cache_path );
1198+ mkdir ( $ install_cache_path );
12031199
1204- self ::dir_diff_copy ( $ run_dir , self ::$ cache_dir , $ install_cache_path );
1200+ self ::dir_diff_copy ( $ run_dir , self ::$ cache_dir , $ install_cache_path );
12051201
1206- if ( 'sqlite ' !== self ::$ db_type ) {
1207- $ mysqldump_binary = Utils \get_sql_dump_command ();
1208- $ mysqldump_binary = Utils \force_env_on_nix_systems ( $ mysqldump_binary );
1209- $ support_column_statistics = exec ( "{$ mysqldump_binary } --help | grep 'column-statistics' " );
1210- $ command = "{$ mysqldump_binary } --no-defaults --no-tablespaces " ;
1211- if ( $ support_column_statistics ) {
1212- $ command .= ' --skip-column-statistics ' ;
1213- }
1214- self ::run_sql ( $ command , [ 'result-file ' => "{$ install_cache_path }.sql " ], true /*add_database*/ );
1202+ if ( 'sqlite ' !== self ::$ db_type ) {
1203+ $ mysqldump_binary = Utils \get_sql_dump_command ();
1204+ $ mysqldump_binary = Utils \force_env_on_nix_systems ( $ mysqldump_binary );
1205+ $ support_column_statistics = exec ( "{$ mysqldump_binary } --help | grep 'column-statistics' " );
1206+ $ command = "{$ mysqldump_binary } --no-defaults --no-tablespaces " ;
1207+ if ( $ support_column_statistics ) {
1208+ $ command .= ' --skip-column-statistics ' ;
12151209 }
1210+ self ::run_sql ( $ command , [ 'result-file ' => "{$ install_cache_path }.sql " ], true /*add_database*/ );
1211+ }
12161212
1217- if ( 'sqlite ' === self ::$ db_type ) {
1218- // This is the sqlite equivalent of creating a database dump in MySQL
1219- copy ( "$ run_dir/wp-content/database/.ht.sqlite " , "{$ install_cache_path }.sqlite " );
1220- }
1213+ if ( 'sqlite ' === self ::$ db_type ) {
1214+ // This is the sqlite equivalent of creating a database dump in MySQL
1215+ copy ( "$ run_dir/wp-content/database/.ht.sqlite " , "{$ install_cache_path }.sqlite " );
12211216 }
12221217 }
12231218 }
@@ -1557,11 +1552,6 @@ function wpcli_bootstrap_behat_feature_context() {
15571552 $ framework_folder = FeatureContext::get_framework_dir ();
15581553 wp_cli_behat_env_debug ( "Framework folder location: {$ framework_folder }" );
15591554
1560- // Didn't manage to detect a valid framework folder.
1561- if ( empty ( $ vendor_folder ) ) {
1562- return ;
1563- }
1564-
15651555 // Load helper functionality that is needed for the tests.
15661556 require_once "{$ framework_folder }/php/utils.php " ;
15671557 require_once "{$ framework_folder }/php/WP_CLI/Process.php " ;
0 commit comments