diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-21 18:43:16 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-21 18:43:16 +0100 |
commit | 560261b88e2ff44c58bb8255e029fd09fb8b0397 (patch) | |
tree | 1d7793b7ba193cc963ab0132d8ca70a2e4cebce9 /util | |
parent | 3319886e03e01d0bbee572d3de201e8c8dff6e0b (diff) | |
download | prosody-560261b88e2ff44c58bb8255e029fd09fb8b0397.tar.gz prosody-560261b88e2ff44c58bb8255e029fd09fb8b0397.zip |
util.prosodyctl: Propagate status from luarocks invocation
Diffstat (limited to 'util')
-rw-r--r-- | util/prosodyctl.lua | 7 |
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 { |