Mercurial > prosody-hg
changeset 13977:3326c8a29a86
util.prosodyctl.shell: Send result line to stderr to help TSV parsing
When output is piped somewhere and tables are formatted as TSV, it
complicates parsing to have a non-TSV line at the end.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 06 Oct 2025 00:30:14 +0200 |
| parents | a2d4c71f5066 |
| children | d520cee2bbdb |
| files | util/prosodyctl/shell.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/shell.lua Sun Oct 05 11:08:27 2025 +0200 +++ b/util/prosodyctl/shell.lua Mon Oct 06 00:30:14 2025 +0200 @@ -99,7 +99,7 @@ client.events.add_handler("received", function(stanza) if stanza.name == "repl-output" or stanza.name == "repl-result" then local dest = io.stdout; - if stanza.attr.type == "error" then + if stanza.name == "repl-result" or stanza.attr.type == "error" then errors = errors + 1; dest = io.stderr; end
