Software /
code /
prosody
Comparison
prosodyctl @ 11295:50ea7d9143ad
prosodyctl: Abort if no plugin source specified for the installer
Better than having a non-working default.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 Jan 2021 19:11:27 +0100 |
parent | 11294:a1939b261f67 |
child | 11297:2e9d4c517919 |
comparison
equal
deleted
inserted
replaced
11294:a1939b261f67 | 11295:50ea7d9143ad |
---|---|
78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); | 78 show_usage([[install]], [[Installs a prosody/luarocks plugin]]); |
79 return 1; | 79 return 1; |
80 end | 80 end |
81 show_message("Installing %s in %s", arg[1], prosody.paths.installer); | 81 show_message("Installing %s in %s", arg[1], prosody.paths.installer); |
82 -- TODO finalize config option name | 82 -- TODO finalize config option name |
83 local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/"); | 83 local server = configmanager.get("*", "plugin_server"); |
84 if not server then | |
85 show_warning("There is no 'plugin_server' option in the configuration file"); | |
86 -- see https://prosody.im/doc/TODO documentation | |
87 return 1; | |
88 end | |
89 local ret = call_luarocks("install", arg[1], server); | |
84 if ret == 0 and operation == "install" then | 90 if ret == 0 and operation == "install" then |
85 show_module_configuration_help(mod); | 91 show_module_configuration_help(mod); |
86 end | 92 end |
87 return ret; | 93 return ret; |
88 end | 94 end |