testing: Make commands tests pass in Go 1.26.1

This commit is contained in:
Bjørn Erik Pedersen
2026-03-06 12:18:19 +01:00
parent d4f2122dea
commit 157bfddda5
+2 -1
View File
@@ -463,7 +463,8 @@ func testSetupFunc() func(env *testscript.Env) error {
goModVersion := goVersion
// From Go 1.26.0 on, the version used in go.mod on go mod init is the current version minus one.
if htesting.GoMinorVersion() >= 26 {
// This was reverted in Go 1.26.1.
if goVersion == "1.26.0" {
goModVersion = "1.25.0"
}