]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
If quiet, do not print the command header for backend-cmd if there is only one.
authorMiod Vallat <miod.vallat@powerdns.com>
Mon, 21 Jul 2025 12:56:11 +0000 (14:56 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Mon, 18 Aug 2025 06:26:50 +0000 (08:26 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/pdnsutil.cc

index 74efa6a788faca7674a890d8524bd8e96ded4ed1..a858a3fdbf2096d17a667cf0817493751b7c4593 100644 (file)
@@ -5285,7 +5285,9 @@ static int backendCmd(vector<string>& cmds, const std::string_view synopsis)
   }
 
   for (auto i = next(begin(cmds), 1); i != end(cmds); ++i) {
-    cerr << "== " << *i << endl;
+    if (cmds.size() != 2 && !g_quiet) {
+      cerr << "== " << *i << endl;
+    }
     cout << matchingBackend->directBackendCmd(*i);
   }