From 75dd9d61ff96be391e3410fee384c87fdf7566d5 Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Wed, 22 May 2024 10:27:16 +0200 Subject: [PATCH] Use the proper logic when disabling the go module version Signed-off-by: Cosmin Cojocar --- helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index 098d311..5493efe 100644 --- a/helpers.go +++ b/helpers.go @@ -502,7 +502,7 @@ func RootPath(root string) (string, error) { // GoVersion returns parsed version of Go mod version and fallback to runtime version if not found. func GoVersion() (int, int, int) { _, ok := os.LookupEnv(noGoModVersion) - if ok { + if !ok { if goModVersion, err := goModVersion(); err == nil { return parseGoVersion(goModVersion) }