File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 4040 continue ;
4141 }
4242
43+ $ destination = isset ( $ clone_destination_map [ $ repository ->name ] ) ? $ clone_destination_map [ $ repository ->name ] : $ repository ->name ;
44+
4345 if ( ! is_dir ( $ repository ->name ) ) {
44- $ destination = isset ( $ clone_destination_map [ $ repository ->name ] ) ? $ clone_destination_map [ $ repository ->name ] : '' ;
4546 printf ( "Fetching \033[32mwp-cli/ {$ repository ->name }\033[0m... \n" );
4647 $ clone_url = getenv ( 'GITHUB_ACTION ' ) ? $ repository ->clone_url : $ repository ->ssh_url ;
4748 system ( "git clone {$ clone_url } {$ destination }" );
4849 }
4950
50- $ update_folders [] = $ repository -> name ;
51+ $ update_folders [] = $ destination ;
5152}
5253
5354$ updates = implode ( '\n ' , $ update_folders );
Original file line number Diff line number Diff line change 1010printf ( "--- Refreshing repository \033[32m {$ repository }\033[0m --- \n" );
1111
1212printf ( "Switching to latest \033[33mdefault \033[0m branch... \n" );
13- system ( "git --git-dir= {$ path }/.git --work-tree= {$ path } checkout $(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5) " );
13+ system ( "git --git-dir= {$ path }/.git --work-tree= {$ path } checkout $(git --git-dir= { $ path } /.git remote show origin | grep 'HEAD branch' | cut -d' ' -f5) " );
1414
1515printf ( "Pulling latest changes... \n" );
1616system ( "git --git-dir= {$ path }/.git --work-tree= {$ path } pull " );
You can’t perform that action at this time.
0 commit comments