mirror of
https://github.com/golang/go
synced 2024-11-18 10:54:40 -07:00
internal/lsp/cache: fix gopackagesdriver binary detection logic
GOPACKAGESDRIVER=off supersedes the existence of a gopackagesdriver binary. Change-Id: I0f2f78850c5cc1163f22ca858e5783b0899f4490 Reviewed-on: https://go-review.googlesource.com/c/tools/+/247685 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
parent
ace63f8701
commit
e1f7ec57ef
2
internal/lsp/cache/view.go
vendored
2
internal/lsp/cache/view.go
vendored
@ -867,7 +867,7 @@ func (v *View) setGoEnv(ctx context.Context, configEnv []string) (string, error)
|
||||
// works the same way as setting GOPACKAGESDRIVER.
|
||||
gopackagesdriver := os.Getenv("GOPACKAGESDRIVER")
|
||||
tool, _ := exec.LookPath("gopackagesdriver")
|
||||
v.goCommand = tool == "" && (gopackagesdriver == "" || gopackagesdriver == "off")
|
||||
v.goCommand = gopackagesdriver == "off" || (gopackagesdriver == "" && tool == "")
|
||||
return gomod, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user