File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
10
10
"time"
11
11
)
12
12
13
- const _VERSION = "0.2.1 "
13
+ const _VERSION = "0.2.2 "
14
14
15
15
func Version () string {
16
16
return _VERSION
@@ -49,18 +49,18 @@ func BinVersion() (string, error) {
49
49
return "" , err
50
50
}
51
51
52
- // Handle special case on Windows.
53
- i := strings .Index (stdout , "windows" )
54
- if i >= 1 {
55
- gitVersion = stdout [:i - 1 ]
56
- return gitVersion , nil
57
- }
58
-
59
52
fields := strings .Fields (stdout )
60
53
if len (fields ) < 3 {
61
54
return "" , fmt .Errorf ("not enough output: %s" , stdout )
62
55
}
63
56
57
+ // Handle special case on Windows.
58
+ i := strings .Index (fields [2 ], "windows" )
59
+ if i >= 1 {
60
+ gitVersion = fields [2 ][:i - 1 ]
61
+ return gitVersion , nil
62
+ }
63
+
64
64
gitVersion = fields [2 ]
65
65
return gitVersion , nil
66
66
}
You can’t perform that action at this time.
0 commit comments