Skip to content

Commit 90eba71

Browse files
committed
Go: Include versions in newer Go version log message
1 parent 84baea5 commit 90eba71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ func installDependenciesAndBuild() {
548548
if semver.Compare(getEnvGoSemVer(), "v1.21.0") < 0 && goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 {
549549
diagnostics.EmitNewerGoVersionNeeded(getEnvGoSemVer(), "v"+goVersionInfo.Version)
550550
if val, _ := os.LookupEnv("GITHUB_ACTIONS"); val == "true" {
551-
log.Printf("The go.mod version is newer than the installed version of Go. Consider adding an actions/setup-go step to your workflow.\n")
551+
log.Printf(
552+
"The go.mod file requires version %s of Go, but version %s is installed. Consider adding an actions/setup-go step to your workflow.\n",
553+
"v"+goVersionInfo.Version,
554+
getEnvGoSemVer())
552555
}
553556
}
554557

0 commit comments

Comments
 (0)