From 52a2cfcb007167e2acec60cb750e94242145bdcb Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Wed, 12 Jul 2023 23:53:54 +0000 Subject: [PATCH] check for pact cli when running test-pact --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b6e3e369..4720a1e7 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,12 @@ test-unit: .PHONY: test-pact test-pact: - go test -v ./pact/... -tags "$(BUILDTAGS)" + @echo "Running Pact tests..." + @if ! command -v pact-mock-service &> /dev/null; then \ + echo "The 'pact-mock-service' command is not found on your PATH. Please install the CLI from the releases page in https://github.com/pact-foundation/pact-ruby-standalone."; \ + else \ + go test -v ./pact/... -tags "$(BUILDTAGS)"; \ + fi .PHONY: test test: test-unit test-pact