Skip to content

Commit

Permalink
Windows compatibility fix for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Jun 25, 2020
1 parent 1702ac2 commit 3836599
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/tric.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,13 @@ function maybe_prompt_for_repo_update() {
}

if ( empty( $remote_version ) || empty( $check_date ) || $today > $check_date ) {
$tags = explode( "\n", shell_exec( 'cd ' . TRIC_ROOT_DIR . ' && git ls-remote --tags origin' ) );
$current_dir = getcwd();
chdir( TRIC_ROOT_DIR );

$tags = explode( "\n", shell_exec( 'git ls-remote --tags origin' ) );

chdir( $current_dir );

foreach ( $tags as &$tag ) {
$tag_parts = explode( '/', $tag );
$tag = array_pop( $tag_parts );
Expand Down

0 comments on commit 3836599

Please sign in to comment.