From ab723c7784d71bb2a78c1dc2bda77bc0d1fa5218 Mon Sep 17 00:00:00 2001 From: Bejal Lewis Date: Mon, 12 Jan 2026 18:01:28 +0100 Subject: [PATCH] Run go mod tidy in collector if go.mod file exists --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 852b3199f0a..0235e60ec0e 100644 --- a/Makefile +++ b/Makefile @@ -273,6 +273,9 @@ generate-otel-collector-distro: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else + @if [ -f ./collector/go.mod ]; then \ + cd ./collector && go mod tidy; \ + fi # Here we clear the GOOS and GOARCH env variables so we're not accidentally cross compiling the builder tool within generate cd ./collector && GOOS= GOARCH= BUILDER_VERSION=$(BUILDER_VERSION) go generate endif