mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
cmd/gogio: allow missing tool version components
This commit changes the way that gogio searches for build tools so that it correctly identifies versions like '31' as equivalent to '31.0.0'. The Android SDK appears to not provide version components in the path name when the component is zero. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
@@ -955,9 +955,6 @@ loop:
|
||||
for _, path := range paths {
|
||||
name := filepath.Base(path)
|
||||
s := strings.SplitN(name, ".", 3)
|
||||
if len(s) != len(bestVer) {
|
||||
continue
|
||||
}
|
||||
var version [3]int
|
||||
for i, v := range s {
|
||||
v, err := strconv.Atoi(v)
|
||||
|
||||
Reference in New Issue
Block a user