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 <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-05-18 12:13:08 +02:00 committed by mergify[bot]
parent cae8f529dc
commit 686db53fde

View File

@ -40,7 +40,7 @@ LDFLAGS += -X $(GO_PROJECT)/internal/util.DriverVersion=$(CSI_IMAGE_VERSION)
# set GOARCH explicitly for cross building, default to native architecture # set GOARCH explicitly for cross building, default to native architecture
ifndef GOARCH ifndef GOARCH
GOARCH := $(shell go env GOARCH) GOARCH := $(shell go env GOARCH 2>/dev/null)
endif endif
ifdef BASE_IMAGE ifdef BASE_IMAGE