mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 07:09:57 -05:00
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
This commit is contained in:
parent
728feaecf0
commit
0016e21cd6
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue