Skip to content

Commit

Permalink
goversion: include pre-releases in VersionAfterOrEqual check (#3607)
Browse files Browse the repository at this point in the history
Change VersionAfterOrEqual(x, A, B) to return true for pre-releases of
version A.B. This is what it did before, it was broken when goversion
was changed to support the new version format.
  • Loading branch information
aarzilli authored Dec 26, 2023
1 parent 5b52958 commit a9c67f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/goversion/go_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func Installed() (GoVersion, bool) {
// or go version) is major.minor or a later version, or a development
// version.
func VersionAfterOrEqual(version string, major, minor int) bool {
return VersionAfterOrEqualRev(version, major, minor, -1)
return VersionAfterOrEqualRev(version, major, minor, betaEnd)
}

// VersionAfterOrEqualRev checks that version (as returned by runtime.Version()
Expand Down

0 comments on commit a9c67f1

Please sign in to comment.