@@ -1019,6 +1019,7 @@ public function install_wp( $subdir = '' ) {
10191019 }
10201020
10211021 error_log ( 'Install Cache Dir: ' . self ::$ install_cache_dir );
1022+ error_log ( 'Install Cache Path: ' . $ install_cache_path );
10221023 error_log ( 'Cache Dir: ' . self ::$ cache_dir );
10231024 error_log ( print_r ( scandir ( self ::$ cache_dir ), true ) );
10241025 error_log ( 'SQLite Cache Dir: ' . self ::$ sqlite_cache_dir );
@@ -1033,6 +1034,8 @@ public function install_wp( $subdir = '' ) {
10331034
10341035 self ::copy_dir ( $ install_cache_path , $ run_dir );
10351036
1037+ error_log ( 'Run Dir after Copy: ' );
1038+
10361039 error_log ( print_r ( scandir ( $ run_dir ), true ) );
10371040
10381041 // This is the sqlite equivalent of restoring a database dump in MySQL
@@ -1043,11 +1046,18 @@ public function install_wp( $subdir = '' ) {
10431046 }
10441047 } else {
10451048 error_log ( '$subdir: ' . $ subdir );
1046- error_log ( print_r ( scandir ( $ subdir ), true ) );
1049+ if ( $ subdir ) {
1050+ error_log ( print_r ( scandir ( $ subdir ), true ) );
1051+ }
10471052
1048- $ this ->proc ( 'wp core install ' , $ install_args , $ subdir )->run_check ();
1053+ $ result = $ this ->proc ( 'wp core install ' , $ install_args , $ subdir )->run_check ();
1054+ error_log ( $ result ->stderr );
1055+ error_log ( $ result ->stdout );
10491056 if ( $ install_cache_path ) {
1050- mkdir ( $ install_cache_path );
1057+ if ( ! file_exists ( $ install_cache_path ) ) {
1058+ mkdir ( $ install_cache_path );
1059+ }
1060+
10511061 self ::dir_diff_copy ( $ run_dir , self ::$ cache_dir , $ install_cache_path );
10521062
10531063 if ( 'mysql ' === self ::$ db_type ) {
0 commit comments