# HG changeset patch # User Kim Alvefur # Date 1611250996 -3600 # Node ID 9a98464a35e40308208b46f86a6c7534f4396029 # Parent 7919ecdc4a726aadd74ed6acbc9e79ee7b6b74a4 util.prosodyctl: Propagate status from luarocks invocation diff -r 7919ecdc4a72 -r 9a98464a35e4 util/prosodyctl.lua --- a/util/prosodyctl.lua Thu Jan 21 18:39:18 2021 +0100 +++ b/util/prosodyctl.lua Thu Jan 21 18:43:16 2021 +0100 @@ -226,12 +226,17 @@ elseif operation == "remove" then show_message("Removing %s from %s", mod, dir); end - os.execute(render_cli("luarocks {op} --tree={dir} {server&--server={server}} {mod?}", { + local ok, where, code = os.execute(render_cli("luarocks {op} --tree={dir} {server&--server={server}} {mod?}", { dir = dir; op = operation; mod = mod; server = server; })); + if type(ok) == "number" then ok, code = ok == 0, ok; end + if not ok then + return code; + end if operation == "install" then show_module_configuration_help(mod); end + return true; end return {