From 6652685f5a105a5f86c01217a6931ca8d48cfb84 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Sat, 11 May 2024 14:33:27 +0100 Subject: [PATCH] Go: Restore `toolchain.IsInstalled` check --- go/extractor/autobuilder/build-environment.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/extractor/autobuilder/build-environment.go b/go/extractor/autobuilder/build-environment.go index 07468862fa85..125fa8b91d5f 100644 --- a/go/extractor/autobuilder/build-environment.go +++ b/go/extractor/autobuilder/build-environment.go @@ -274,7 +274,9 @@ func IdentifyEnvironment() { v.goModVersion = project.RequiredGoVersion(&workspaces) // Find which, if any, version of Go is installed on the system already. - v.goEnvVersion = toolchain.GetEnvGoSemVer() + if toolchain.IsInstalled() { + v.goEnvVersion = toolchain.GetEnvGoSemVer() + } // Determine which version of Go we should recommend to install. msg, versionToInstall := getVersionToInstall(v)