diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-12-22 10:53:03 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-12-22 11:33:59 +0100 |
commit | 0016e21cd6b3cc267a9b0d99adb9ba13bde48e4c (patch) | |
tree | 3ada1c750cf2e8cee46b96fd5b4fa2b8c13e9454 /modules | |
parent | 728feaecf03424c38132fe5c2ac7ea767fec64b4 (diff) | |
download | hugo-0016e21cd6b3cc267a9b0d99adb9ba13bde48e4c.tar.gz hugo-0016e21cd6b3cc267a9b0d99adb9ba13bde48e4c.zip |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/client.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/client.go b/modules/client.go index 1924cd5b4..5b61e5644 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 |