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 | f3856b703da3fd4e87d8d66bfaca5f52067991bf (patch) | |
tree | 1d7793b7ba193cc963ab0132d8ca70a2e4cebce9 | |
parent | 50d9045de639159a0c5a54bdb42c23d5b72adaa1 (diff) | |
download | prosody-f3856b703da3fd4e87d8d66bfaca5f52067991bf.tar.gz prosody-f3856b703da3fd4e87d8d66bfaca5f52067991bf.zip |
util.prosodyctl: Propagate status from luarocks invocation
-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 { |