From 686db53fde8189c1f62d6f2dee24d31f34934889 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 18 May 2020 12:13:08 +0200 Subject: [PATCH] build: prevent error message when 'go' is unavailable In case the `go` executable is not available, any `make` command shows the error `go: command not found` even when running the actual task in a container (that will have `go` available). So, redirect the error message to `/dev/null`. In case `go` is really not available in the build environment, the `check-env` make target will report it. Signed-off-by: Niels de Vos --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b8f74b94..20a698bc1 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ LDFLAGS += -X $(GO_PROJECT)/internal/util.DriverVersion=$(CSI_IMAGE_VERSION) # set GOARCH explicitly for cross building, default to native architecture ifndef GOARCH -GOARCH := $(shell go env GOARCH) +GOARCH := $(shell go env GOARCH 2>/dev/null) endif ifdef BASE_IMAGE