From 6bc1e8931074c819e0b9ef8a7c0c34dcfd7d247d Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Fri, 24 May 2019 17:51:05 +0200 Subject: [PATCH] Fix k8s internal error printing We no longer use a vendor directory after switching to Go modules. --- cmd/fluxd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fluxd/main.go b/cmd/fluxd/main.go index 57a4cbedf..826f9ecae 100644 --- a/cmd/fluxd/main.go +++ b/cmd/fluxd/main.go @@ -200,7 +200,7 @@ func main() { "type", "internal kubernetes error", "kubernetes_caller", log.Valuer(func() interface{} { _, file, line, _ := runtime.Caller(5) // we want to log one level deeper than k8sruntime.HandleError - idx := strings.Index(file, "/vendor/") + idx := strings.Index(file, "/k8s.io/") return file[idx+1:] + ":" + strconv.Itoa(line) })) logErrorUnlessAccessRelated := func(err error) {