Skip to content

Commit

Permalink
fix: parse git versions without patch or minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lesikov committed Dec 23, 2021
1 parent ae88ff6 commit 17a20be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/true_git/init.go
Expand Up @@ -77,7 +77,7 @@ func getGitCliVersion() (string, error) {
return "", errors.New(errMsg)
}

fullVersionMatch := regexp.MustCompile(`git version ([0-9]+\.[0-9]+\.[0-9]+)`).FindStringSubmatch(stdout.String())
fullVersionMatch := regexp.MustCompile(`git version ([.0-9]+)`).FindStringSubmatch(stdout.String())
if len(fullVersionMatch) < 2 {
return "", errors.New(fmt.Sprintf("unable to parse git version from stdout: %s", stdout.String()))
}
Expand Down

0 comments on commit 17a20be

Please sign in to comment.