From 02fa1561509eed0accd7951e2c23f7ff45039e33 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 18 Nov 2022 20:24:42 +0100 Subject: [PATCH] Makefile: go-mod-vendor: fix copying of gogo/protobuf Possibly it's using a non-standard location; cp: cannot stat '/home/circleci/.go_workspace:/usr/local/go_workspace/pkg/mod/github.com/gogo/protobuf@v1.3.2/protobuf': No such file or directory make: *** [direct.mk:146: go-mod-vendor] Error 1 So, using GOMODCACHE path instead of trying to construct our own. Signed-off-by: Sebastiaan van Stijn --- direct.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct.mk b/direct.mk index 534a431360..38ce0f9dd0 100644 --- a/direct.mk +++ b/direct.mk @@ -143,6 +143,6 @@ go-mod-vendor: @go mod vendor @# ensure that key protobuf spec files are in vendor dir @module=github.com/gogo/protobuf ; \ - prefix=$$(go env GOPATH)/pkg/mod/$${module} ; \ + prefix=$$(go env GOMODCACHE)/$${module} ; \ version=$$(go list -m -f '{{.Version}}' $${module}) ; \ cp -a $${prefix}@$${version}/protobuf vendor/$${module}/ && chmod -R u+w vendor/$${module}