Skip to content
Permalink
Browse files
fix: parse git versions without patch or minor version
  • Loading branch information
ilya-lesikov committed Dec 23, 2021
1 parent ae88ff6 commit 17a20be81975240063bcdb004801274639321b33
Showing with 1 addition and 1 deletion.
  1. +1 −1 pkg/true_git/init.go
@@ -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()))
}

0 comments on commit 17a20be

Please sign in to comment.