From f8760310dda126b9648e55ee7117956d29b1f438 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Sat, 23 Dec 2023 20:27:40 -0700 Subject: [PATCH] Suppress golang vendor errors during dependency resolutions The godeps macro is used by the Makefile to determine if golang binaries need to be rebuilt based on changes to their dependencies, which may include libraries in vendor. This produces errors if the vendor directory is not present. This change suppresses error messages during dependency resolution. Signed-off-by: Jonathon Anderson --- Variables.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Variables.mk b/Variables.mk index b3d34108..2451c50e 100644 --- a/Variables.mk +++ b/Variables.mk @@ -83,7 +83,7 @@ CONFIG := $(shell pwd) IPXESOURCE ?= $(PREFIX)/share/ipxe # helper functions -godeps=$(shell go list -mod vendor -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1) | sed "s%${PWD}/%%g") +godeps=$(shell 2>/dev/null go list -mod vendor -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1) | sed "s%${PWD}/%%g") # use GOPROXY for older git clients and speed up downloads GOPROXY ?= https://proxy.golang.org