From 94b8fde7ace678ba92d4ac0242ef6fe5a1e4a95e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Sep 2024 23:58:12 +0200 Subject: [PATCH] trurl: silence --replace-append when appending Previously trurl would about a "note" when it did not replace a query name and instead appends it, but since that is just part of its documented behavior that output seems superfluous and rather annoying. Update two tests accordingly. --- tests.json | 4 ++-- trurl.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests.json b/tests.json index 52a8fa00..4bf840eb 100644 --- a/tests.json +++ b/tests.json @@ -2495,7 +2495,7 @@ }, "expected": { "stdout": "http://test.org/?that=thing&key=foo\n", - "stderr": "trurl note: key 'key' not in url, appending to query\n", + "stderr": "", "returncode": 0 } }, @@ -2509,7 +2509,7 @@ }, "expected": { "stdout": "http://test.org/?that=thing&key=foo\n", - "stderr": "trurl note: key 'key' not in url, appending to query\n", + "stderr": "", "returncode": 0 } }, diff --git a/trurl.c b/trurl.c index e8f922c1..e25f1de1 100644 --- a/trurl.c +++ b/trurl.c @@ -1661,9 +1661,6 @@ static bool replace(struct option *o) } if(!replaced && o->force_replace) { - trurl_warnf(o, "key '%.*s' not in url, appending to query", - (int) (key.len), - key.str); addqpair(key.str, strlen(key.str), o->jsonout); query_is_modified = true; }