We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afeed52 commit c2cea55Copy full SHA for c2cea55
src/cmd/dist/buildtool.go
@@ -142,8 +142,10 @@ func bootstrapBuildTools() {
142
_, after, _ := strings.Cut(ver, "go1")
143
if after != "" {
144
v := strings.Split(after, ".")
145
- if len(v) > 2 {
146
- if v[0] < minBootStrapVersion[1] || v[1] < minBootStrapVersion[2] {
+ // if go version output is go1.22.6 goos/goarch
+ // v is ["","22","6 goos/aoarch"].
147
+ if len(v) == 3 {
148
+ if v[1] < minBootStrapVersion[1] || strings.Split(v[2], " ")[0] < minBootStrapVersion[2] {
149
fatalf("requires Go 1.%s.%s or later for bootstrap", minBootStrapVersion[1], minBootStrapVersion[2])
150
}
151
0 commit comments