From 31a76d155429cfb870f3988719b61dd875c8cb03 Mon Sep 17 00:00:00 2001 From: Albert <26584478+albertteoh@users.noreply.github.com> Date: Wed, 28 Apr 2021 11:29:37 +1000 Subject: [PATCH] Add warning if esc not installed (#2964) * Add warning if esc not installed Signed-off-by: albertteoh * Fail the make target Signed-off-by: albertteoh * Move esc command outside conditional block Signed-off-by: albertteoh --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7de3f8c7af4..b4620f68c73 100644 --- a/Makefile +++ b/Makefile @@ -230,7 +230,14 @@ jaeger-ui/packages/jaeger-ui/build/index.html: cd jaeger-ui && yarn install --frozen-lockfile && cd packages/jaeger-ui && yarn build cmd/query/app/ui/actual/gen_assets.go: jaeger-ui/packages/jaeger-ui/build/index.html - esc -pkg assets -o cmd/query/app/ui/actual/gen_assets.go -prefix jaeger-ui/packages/jaeger-ui/build jaeger-ui/packages/jaeger-ui/build + @if ! command -v esc > /dev/null 2>&1 ; then \ + echo "esc: Command not found" ; \ + echo "Check:" ; \ + echo "- esc is installed: 'make install-tools'" ; \ + echo "- add \$$GOPATH into \$$PATH: 'export PATH=\$$PATH:\$$(go env GOPATH)/bin'" ; \ + false ; \ + fi + esc -pkg assets -o cmd/query/app/ui/actual/gen_assets.go -prefix jaeger-ui/packages/jaeger-ui/build jaeger-ui/packages/jaeger-ui/build ; \ .PHONY: build-all-in-one-linux build-all-in-one-linux: