From 541541b5958a02fbc78cc6e2f09ca1b37bd6ce8b Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 24 Dec 2024 11:02:34 +0100 Subject: [PATCH] Jq: ignore empty content --- provider/pipeline/pipeline.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provider/pipeline/pipeline.go b/provider/pipeline/pipeline.go index 467d006db5..b6145911a6 100644 --- a/provider/pipeline/pipeline.go +++ b/provider/pipeline/pipeline.go @@ -184,6 +184,10 @@ func (p *Pipeline) Process(in []byte) ([]byte, error) { } if p.jq != nil { + // TODO make this optional + if len(bytes.TrimSpace(b)) == 0 { + return b, nil + } v, err := jq.Query(p.jq, b) if err != nil { return b, backoff.Permanent(err)