Skip to content

Commit 6480d2d

Browse files
committed
Go: Restore toolchain.IsInstalled check
1 parent d564b5f commit 6480d2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/extractor/autobuilder/build-environment.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ func IdentifyEnvironment() {
274274
v.goModVersion = project.RequiredGoVersion(&workspaces)
275275

276276
// Find which, if any, version of Go is installed on the system already.
277-
v.goEnvVersion = toolchain.GetEnvGoSemVer()
277+
if toolchain.IsInstalled() {
278+
v.goEnvVersion = toolchain.GetEnvGoSemVer()
279+
}
278280

279281
// Determine which version of Go we should recommend to install.
280282
msg, versionToInstall := getVersionToInstall(v)

0 commit comments

Comments
 (0)