From: Bjørn Erik Pedersen Date: Wed, 22 Dec 2021 09:53:03 +0000 (+0100) Subject: modules: Set GOCACHE env var X-Git-Tag: v0.91.1~7 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0016e21cd6b3cc267a9b0d99adb9ba13bde48e4c;p=brevno-suite%2Fhugo modules: Set GOCACHE env var This was introduced in Go 1.15. We do set the GOPATH, which should be enough, but #9309 indicate that's not the case on every platform (GitHub Actions). Closes #9309 --- diff --git a/modules/client.go b/modules/client.go index 1924cd5b..5b61e564 100644 --- a/modules/client.go +++ b/modules/client.go @@ -90,6 +90,8 @@ func NewClient(cfg ClientConfig) *Client { "GOPRIVATE", mcfg.Private, "GONOPROXY", mcfg.NoProxy, "GOPATH", cfg.CacheDir, + // GOCACHE was introduced in Go 1.15. This matches the location derived from GOPATH above. + "GOCACHE", filepath.Join(cfg.CacheDir, "pkg", "mod"), ) logger := cfg.Logger