util/prosodyctl.lua
changeset 12789 123d74bf60e3
parent 11494 34d4e4a01ef8
child 12979 d10957394a3c
--- a/util/prosodyctl.lua	Thu Oct 20 17:36:05 2022 +0200
+++ b/util/prosodyctl.lua	Thu Oct 20 17:37:07 2022 +0200
@@ -224,8 +224,7 @@
 	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 {