From 8f94911f982dfeafa725db2ec2bc56940654c0ff Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 01:58:57 +0000 Subject: [PATCH] Updated the make tidy command to check for errors and ensure that the GO variable is set correctly --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index de6570dd9..45b6aa187 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,13 @@ check: ## tidy: tidy go.mod ✨ .PHONY: tidy tidy: - @$(GO) mod tidy + # Ensure that the GO variable is set correctly + if [ -z "$(GO)" ]; then echo "GO variable is not set"; exit 1; fi + # Run the go mod tidy command and check for errors + @$(GO) mod tidy || (echo "go mod tidy failed"; exit 1) + if [ -z "$(GO)" ]; then echo "GO variable is not set"; exit 1; fi + # Run the go mod tidy command and check for errors + @$(GO) mod tidy || (echo "go mod tidy failed"; exit 1) ## vendor: vendor go.mod ✨ .PHONY: vendor