Diff

util/prosodyctl.lua @ 12785:123d74bf60e3

util.prosodyctl: Remove Lua 5.1 os.execute() return value compat
author Kim Alvefur <zash@zash.se>
date Thu, 20 Oct 2022 17:37:07 +0200
parent 11490:34d4e4a01ef8
child 12975:d10957394a3c
line wrap: on
line diff
--- 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 {