1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-05-02 03:47:01 +00:00

modules: Set GOCACHE env var

This was introduced in Go 1.15. We do set the GOPATH, which should be enough, but  indicate that's not the case on every platform (GitHub Actions).

Closes 
This commit is contained in:
Bjørn Erik Pedersen 2021-12-22 10:53:03 +01:00
parent 728feaecf0
commit 0016e21cd6

View file

@ -90,6 +90,8 @@ func NewClient(cfg ClientConfig) *Client {
"GOPRIVATE", mcfg.Private, "GOPRIVATE", mcfg.Private,
"GONOPROXY", mcfg.NoProxy, "GONOPROXY", mcfg.NoProxy,
"GOPATH", cfg.CacheDir, "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 logger := cfg.Logger