diff --git a/git.go b/git.go index b771165..a175f29 100644 --- a/git.go +++ b/git.go @@ -10,7 +10,7 @@ import ( "time" ) -const _VERSION = "0.1.0" +const _VERSION = "0.1.1" func Version() string { return _VERSION @@ -49,6 +49,13 @@ func BinVersion() (string, error) { return "", err } + // Handle special case on Windows. + i := strings.Index(stdout, "windows") + if i >= 1 { + gitVersion = stdout[:i-1] + return gitVersion, nil + } + fields := strings.Fields(stdout) if len(fields) < 3 { return "", fmt.Errorf("not enough output: %s", stdout)