Skip to content

Commit 0eca8ab

Browse files
h9jianggopherbot
authored andcommitted
extension/tools/installtools: avoid using module proxy for test
When releasing gopls, the newly released version may not be available which could cause the gopls release automation failure. Change-Id: Ie3a66888a8c91a5191d733785fa9158277a523c5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/775784 Auto-Submit: Hongxiang Jiang <hxjiang@golang.org> TryBot-Bypass: Hongxiang Jiang <hxjiang@golang.org> Reviewed-by: Madeline Kalil <mkalil@google.com>
1 parent fb2b4b1 commit 0eca8ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • extension/tools/installtools

extension/tools/installtools/main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,13 @@ func pickLatest(toolPath string, preferPreview bool) string {
167167
if !preferPreview {
168168
return "latest" // should we pick the pinned version in allTools.ts.in?
169169
}
170-
out, err := exec.Command("go", "list", "-m", "--versions", toolPath).Output()
170+
171+
cmd := exec.Command("go", "list", "-m", "--versions", toolPath)
172+
173+
// Avoid using module proxy to eliminate flakiness caused by module proxy.
174+
cmd.Env = append(os.Environ(), "GOPROXY=direct")
175+
176+
out, err := cmd.Output()
171177
if err != nil {
172178
exitf("failed to find a suitable version for %q: %v", toolPath, err)
173179
}

0 commit comments

Comments
 (0)