From: Kim Alvefur Date: Thu, 23 Jun 2016 19:07:48 +0000 (+0200) Subject: util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates... X-Git-Url: https://git.enpas.org/?p=prosody.git;a=commitdiff_plain;h=ce3e9d066610d7e15e31263f59fa597eca079064 util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates successfully --- diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index cde1cdd4..7c9a3c19 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -44,7 +44,7 @@ end local function getchar(n) local stty_ret = os.execute("stty raw -echo 2>/dev/null"); local ok, char; - if stty_ret == 0 then + if stty_ret == true or stty_ret == 0 then ok, char = pcall(io.read, n or 1); os.execute("stty sane"); else