aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-21 18:43:16 +0100
committerKim Alvefur <zash@zash.se>2021-01-21 18:43:16 +0100
commitf3856b703da3fd4e87d8d66bfaca5f52067991bf (patch)
tree1d7793b7ba193cc963ab0132d8ca70a2e4cebce9 /util/prosodyctl.lua
parent50d9045de639159a0c5a54bdb42c23d5b72adaa1 (diff)
downloadprosody-f3856b703da3fd4e87d8d66bfaca5f52067991bf.tar.gz
prosody-f3856b703da3fd4e87d8d66bfaca5f52067991bf.zip
util.prosodyctl: Propagate status from luarocks invocation
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r--util/prosodyctl.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index c15bdbc6..3dcfbd38 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -226,12 +226,17 @@ local function call_luarocks(operation, mod, server)
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 {