From 3c06b1c83c74590f57872097cebe733129701d54 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Thu, 19 Mar 2020 07:06:12 -0400 Subject: [PATCH] error when ARCH is no set --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ca95789f..fdb9b4c37 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,11 @@ PKG = k8s.io/ingress-nginx BUSTED_ARGS =-v --pattern=_test -ARCH ?= $(shell go env GOARCH) +HOST_ARCH = $(shell which go >/dev/null 2>&1 && go env GOARCH) +ARCH ?= $(HOST_ARCH) +ifeq ($(ARCH),) + $(error mandatory variable ARCH is empty, either set it when calling the command or make sure 'go env GOARCH' works) +endif REGISTRY ?= quay.io/kubernetes-ingress-controller