aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-06-23 21:07:48 +0200
committerKim Alvefur <zash@zash.se>2016-06-23 21:07:48 +0200
commitf7c083c86a1c8c7e1f31e7b4e2a02f945125c3cf (patch)
treeff5b8a95dc88a084c4599d2becf4af2c27a5cf7f /util/prosodyctl.lua
parent41fc70c7cfc60fc8060b8e64ea5706ae1e5de6b8 (diff)
downloadprosody-f7c083c86a1c8c7e1f31e7b4e2a02f945125c3cf.tar.gz
prosody-f7c083c86a1c8c7e1f31e7b4e2a02f945125c3cf.zip
util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates successfully
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r--util/prosodyctl.lua2
1 files changed, 1 insertions, 1 deletions
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