From e673312b7f9142c0f8d50daf8de11eb398d5e1e9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 20 Oct 2022 17:37:07 +0200 Subject: util.prosodyctl: Remove Lua 5.1 os.execute() return value compat --- util/prosodyctl.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index 4d49cd16..b3163799 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -224,8 +224,7 @@ local function call_luarocks(operation, mod, server) local ok, _, code = os.execute(render_cli("luarocks --lua-version={luav} {op} --tree={dir} {server&--server={server}} {mod?}", { dir = dir; op = operation; mod = mod; server = server; luav = _VERSION:match("5%.%d"); })); - if type(ok) == "number" then code = ok; end - return code; + return ok and code; end return { -- cgit v1.2.3