Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3bcfbcd

Browse files
authored
Don't warn when Go version exactly matches go.mod
We had only previously tested this with e.g. installed go 1.20.5 >= go.mod request `go 1.20`; now we have go 1.21.0 which shouldn't elicit a warning because 1.21.0 is equal to the go.mod request `go 1.21`.
1 parent 234763e commit 3bcfbcd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

go/extractor/cli/go-autobuilder/go-autobuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ func installDependenciesAndBuild() {
773773

774774
goModVersion, goModVersionFound := tryReadGoDirective(buildInfo)
775775

776-
if goModVersionFound && semver.Compare("v"+goModVersion, getEnvGoSemVer()) >= 0 {
776+
if goModVersionFound && semver.Compare("v"+goModVersion, getEnvGoSemVer()) > 0 {
777777
diagnostics.EmitNewerGoVersionNeeded()
778778
}
779779

0 commit comments

Comments
 (0)