util.prosodyctl.shell: Coerce terminal width to string (for util.stanza)
authorKim Alvefur <zash@zash.se>
Fri, 07 Apr 2023 13:53:40 +0200
changeset 13054 4ae759490e31
parent 13053 115ce3ab5b8b
child 13055 164c2787901a
util.prosodyctl.shell: Coerce terminal width to string (for util.stanza) Fixes invalid attribute value: expected string, got number
util/prosodyctl/shell.lua
--- a/util/prosodyctl/shell.lua	Fri Apr 07 12:51:26 2023 +0100
+++ b/util/prosodyctl/shell.lua	Fri Apr 07 13:53:40 2023 +0200
@@ -30,7 +30,7 @@
 end
 
 local function send_line(client, line)
-	client.send(st.stanza("repl-input", { width = term_width() }):text(line));
+	client.send(st.stanza("repl-input", { width = tostring(term_width()) }):text(line));
 end
 
 local function repl(client)