Skip to content

Commit 12bc9f8

Browse files
committed
Go: Remove extra "v"s in Autobuilder
1 parent f64e617 commit 12bc9f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,12 @@ func installDependenciesAndBuild() {
537537

538538
// This diagnostic is not required if the system Go version is 1.21 or greater, since the
539539
// Go tooling should install required Go versions as needed.
540-
if semver.Compare(toolchain.GetEnvGoSemVer(), "v1.21.0") < 0 && greatestGoVersion.Found && semver.Compare("v"+greatestGoVersion.Version, toolchain.GetEnvGoSemVer()) > 0 {
541-
diagnostics.EmitNewerGoVersionNeeded(toolchain.GetEnvGoSemVer(), "v"+greatestGoVersion.Version)
540+
if semver.Compare(toolchain.GetEnvGoSemVer(), "v1.21.0") < 0 && greatestGoVersion.Found && semver.Compare(greatestGoVersion.Version, toolchain.GetEnvGoSemVer()) > 0 {
541+
diagnostics.EmitNewerGoVersionNeeded(toolchain.GetEnvGoSemVer(), greatestGoVersion.Version)
542542
if val, _ := os.LookupEnv("GITHUB_ACTIONS"); val == "true" {
543543
log.Printf(
544544
"A go.mod file requires version %s of Go, but version %s is installed. Consider adding an actions/setup-go step to your workflow.\n",
545-
"v"+greatestGoVersion.Version,
545+
greatestGoVersion.Version,
546546
toolchain.GetEnvGoSemVer())
547547
}
548548
}

0 commit comments

Comments
 (0)