Skip to content

Commit

Permalink
package/go: explicitly set GOMODCACHE
Browse files Browse the repository at this point in the history
go mod vendor caches downloaded modules to the Go module cache, which
defaults to $GOPATH/pkg/mod - But can be overridden with the GOMODCACHE
environment variable:

https://go.dev/ref/mod#module-cache

So explicitly set GOMODCACHE= for reproducibility.

Signed-off-by: Peter Korsgaard <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
jacmet authored and yann-morin-1998 committed Jan 16, 2023
1 parent 07a745e commit 162f656
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package/go/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ HOST_GO_COMMON_ENV = \
GOROOT="$(HOST_GO_ROOT)" \
GOPATH="$(HOST_GO_GOPATH)" \
GOCACHE="$(HOST_GO_TARGET_CACHE)" \
GOMODCACHE="$(HOST_GO_GOPATH)/pkg/mod" \
GOPROXY=off \
PATH=$(BR_PATH) \
GOBIN= \
Expand Down

0 comments on commit 162f656

Please sign in to comment.