diff --git a/Makefile.common b/Makefile.common index b336657f..c028133f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -165,8 +165,8 @@ common-deps: .PHONY: update-go-deps update-go-deps: @echo ">> updating Go dependencies" + # GOTOOLCHAIN prevents go get from pulling deps that require a newer Go version. @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ - # Prevent go get from pulling deps that require a newer Go version. GOTOOLCHAIN=go$$($(GO) mod edit -json | jq -r .Go) $(GO) get $$m; \ done $(GO) mod tidy