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