Skip to content

Commit

Permalink
internal/fetch: fix bug setting environment
Browse files Browse the repository at this point in the history
We were adding "GOROOT=" and the path as separate elements to the
environment slice rather than adding the single "GOROOT=<path>" element.

Fixes #70581

Change-Id: I9f8afa271c8bae38ac37d1476eef4f3a532798d6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/635675
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Jonathan Amsterdam <[email protected]>
kokoro-CI: kokoro <[email protected]>
  • Loading branch information
matloob committed Dec 16, 2024
1 parent b2e5c1d commit 06c6edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/fetch/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func NewGoPackagesStdlibModuleGetter(ctx context.Context, dir string) (*goPackag
start := time.Now()
env := []string(nil)
if dir != "" {
env = append(os.Environ(), "GOROOT=", abs)
env = append(os.Environ(), "GOROOT="+abs)
}
cfg := &packages.Config{
Context: ctx,
Expand Down

0 comments on commit 06c6edf

Please sign in to comment.