From 77da7647acf284a050cd7f0ef76ddd637746f415 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Thu, 26 Sep 2024 12:00:35 +0200 Subject: [PATCH] interp: debug/* should use DEBUG: not DEBUG --- pkg/interp/internal.jq | 2 +- pkg/interp/testdata/debug.fqtest | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interp/internal.jq b/pkg/interp/internal.jq index a929ed41..461e2628 100644 --- a/pkg/interp/internal.jq +++ b/pkg/interp/internal.jq @@ -26,7 +26,7 @@ def printerr: tostring | _stderr; def printerrln: ., "\n" | printerr; # jq compat -def debug: (["DEBUG", .] | tojson | printerrln), .; +def debug: (["DEBUG:", .] | tojson | printerrln), .; def debug(f): (f | debug | empty), .; # output raw string or compact json to stderr and let input thru def stderr: printerr, .; diff --git a/pkg/interp/testdata/debug.fqtest b/pkg/interp/testdata/debug.fqtest index d7e26aed..dcbe9037 100644 --- a/pkg/interp/testdata/debug.fqtest +++ b/pkg/interp/testdata/debug.fqtest @@ -11,8 +11,8 @@ null> {a: 123, b: []} | debug({a}) } null> ^D stderr: -["DEBUG",{"a":123,"b":[]}] -["DEBUG",{"a":123}] +["DEBUG:",{"a":123,"b":[]}] +["DEBUG:",{"a":123}] $ fq -n 'null, {a:1}, "abc" | ., "\n" | print' null {"a":1}