aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-04-05 14:27:37 +0200
committerKim Alvefur <zash@zash.se>2022-04-05 14:27:37 +0200
commit03299ee37d3ceb4173a01567d2285869e8737510 (patch)
tree35655d3eb74cb68c169b24761b07966921e17e77 /prosodyctl
parenta6968002916643a266fe5079d74f89a5f8ef0154 (diff)
downloadprosody-03299ee37d3ceb4173a01567d2285869e8737510.tar.gz
prosody-03299ee37d3ceb4173a01567d2285869e8737510.zip
prosodyctl: Pass server when listing (outdated) plugins (fix #1738)
Needed since it checks the manifest of the repository and most likely defaults to luarocks.org unless specified
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl8
1 files changed, 7 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index 2318cf05..4e4099d5 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -115,11 +115,17 @@ function commands.list(arg)
show_usage([[list]], [[Shows installed rocks]]);
return 0;
end
+ local server = opts.server or configmanager.get("*", "plugin_server");
if opts.outdated then
-- put this back for luarocks
arg[1] = "--outdated";
+
+ if not server then
+ show_warning("There is no 'plugin_server' option in the configuration file, but this is needed for 'list --outdated' to work.");
+ return 1;
+ end
end
- local ret = call_luarocks("list", arg[1]);
+ local ret = call_luarocks("list", arg[1], server);
return ret;
end