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 <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2023-12-23 20:27:40 -07:00
parent 8391b2d28b
commit f8760310dd

View File

@@ -83,7 +83,7 @@ CONFIG := $(shell pwd)
IPXESOURCE ?= $(PREFIX)/share/ipxe IPXESOURCE ?= $(PREFIX)/share/ipxe
# helper functions # 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 # use GOPROXY for older git clients and speed up downloads
GOPROXY ?= https://proxy.golang.org GOPROXY ?= https://proxy.golang.org