File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1287,9 +1287,12 @@ public static function remove_dir( $dir ): void {
12871287 * @param string $dest_dir
12881288 */
12891289 public static function copy_dir ( $ src_dir , $ dest_dir ): void {
1290- $ shell_command = ( 'Darwin ' === PHP_OS )
1291- ? Utils \esc_cmd ( 'cp -R %s/* %s ' , $ src_dir , $ dest_dir )
1292- : Utils \esc_cmd ( 'cp -r %s/* %s ' , $ src_dir , $ dest_dir );
1290+ $ shell_command = Utils \esc_cmd ( 'cp -r %s/* %s ' , $ src_dir , $ dest_dir );
1291+ if ( 'Darwin ' === PHP_OS ) {
1292+ $ shell_command = Utils \esc_cmd ( 'cp -R %s/* %s ' , $ src_dir , $ dest_dir );
1293+ } elseif ( self ::is_windows () ) {
1294+ $ shell_command = Utils \esc_cmd ( 'copy /y %s/* %s ' , $ src_dir , $ dest_dir );
1295+ }
12931296 Process::create ( $ shell_command )->run_check ();
12941297 }
12951298
You can’t perform that action at this time.
0 commit comments