Skip to content

Commit 43453fe

Browse files
authored
Merge pull request github#15408 from smowton/smowton/admin/log-setup-go-message
Log advice when a newer Go version is required under Actions
2 parents d29d060 + 7e96eaa commit 43453fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,9 @@ func installDependenciesAndBuild() {
800800
// Go tooling should install required Go versions as needed.
801801
if semver.Compare(getEnvGoSemVer(), "v1.21.0") < 0 && goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 {
802802
diagnostics.EmitNewerGoVersionNeeded()
803+
if val, _ := os.LookupEnv("GITHUB_ACTIONS"); val == "true" {
804+
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")
805+
}
803806
}
804807

805808
fixGoVendorIssues(&buildInfo, goVersionInfo.Found)

0 commit comments

Comments
 (0)