aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-09-14 12:12:19 +0200
committerBjørn Erik Pedersen <[email protected]>2023-09-14 12:35:55 +0200
commitbe2c634751cead54a9369633251f338759ddc0a7 (patch)
tree86ef9409c73906e3f6de0b6bd5ddd208896a21cc
parent75c0f88289585faa9801e7178673bc9ff5f25594 (diff)
downloadhugo-be2c634751cead54a9369633251f338759ddc0a7.tar.gz
hugo-be2c634751cead54a9369633251f338759ddc0a7.zip
Fix tests for Go 1.21.1fix/pingoversion
Fixes #11450
-rw-r--r--main_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main_test.go b/main_test.go
index eda829dbb..2df40b0e2 100644
--- a/main_test.go
+++ b/main_test.go
@@ -398,7 +398,7 @@ func testSetupFunc() func(env *testscript.Env) error {
goVersion := runtime.Version()
goVersion = strings.TrimPrefix(goVersion, "go")
- if !strings.HasSuffix(goVersion, ".0") {
+ if strings.HasPrefix(goVersion, "1.20") {
// Strip patch version.
goVersion = goVersion[:strings.LastIndex(goVersion, ".")]
}