Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp/lsprpc: only propagate explicit GOWORK when using remote
When using gopls remote, existing go env vars are injected in the initialize message. Setting GOWORK explicitly will impact cmd/go invocations, for example "go list" during package load. The reason it impacts is that gopls manually sets PWD to fix paths returned by cmd/go if the working directory is inside a symlinked directory. By only propagate GOWORK when it is explicitly set we will ensure that the behavior is the same when running with or without remote. See golang/go#51823. Fixes golang/go#51825 Change-Id: I6280aa7d8208e5aee269f19356668c7713e9f0a4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/394054 Trust: Pontus Leitzler <leitzler@gmail.com> Run-TryBot: Pontus Leitzler <leitzler@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
- Loading branch information