Skip to content

Commit

Permalink
Fix version check for 3-part versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Aug 26, 2011
1 parent aa3fe69 commit ad4eb4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CheckVersion.ps1
Expand Up @@ -5,7 +5,7 @@ if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) {
}

$requiredVersion = [Version]'1.7.2'
if ((git --version 2> $null) -match '(?<ver>\d\.\d\.\d\.\d)') {
if ((git --version 2> $null) -match '(?<ver>\d(?:\.\d)+)') {
$version = [Version]$Matches['ver']
}
if ($version -lt $requiredVersion) {
Expand Down

0 comments on commit ad4eb4f

Please sign in to comment.