Software /
code /
prosody
Comparison
prosodyctl @ 11294:a1939b261f67
prosodyctl: Move UI related calls out of util.prosodyctl
I think this follows the general separation of duties between prosodyctl
and util.prosodyctl better.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 Jan 2021 19:04:57 +0100 |
parent | 11293:cd27ac5e5afe |
child | 11295:50ea7d9143ad |
comparison
equal
deleted
inserted
replaced
11293:cd27ac5e5afe | 11294:a1939b261f67 |
---|---|
76 function commands.install(arg) | 76 function commands.install(arg) |
77 if arg[1] == "--help" then | 77 if arg[1] == "--help" then |
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 -- TODO finalize config option name | 82 -- TODO finalize config option name |
82 local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/"); | 83 local ret = call_luarocks("install", arg[1], configmanager.get("*", "plugin_server") or "http://localhost/"); |
84 if ret == 0 and operation == "install" then | |
85 show_module_configuration_help(mod); | |
86 end | |
83 return ret; | 87 return ret; |
84 end | 88 end |
85 | 89 |
86 function commands.remove(arg) | 90 function commands.remove(arg) |
87 if arg[1] == "--help" then | 91 if arg[1] == "--help" then |
88 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); | 92 show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); |
89 return 1; | 93 return 1; |
90 end | 94 end |
95 show_message("Removing %s from %s", arg[1], prosody.paths.installer); | |
91 local ret = call_luarocks("remove", arg[1]); | 96 local ret = call_luarocks("remove", arg[1]); |
92 return ret; | 97 return ret; |
93 end | 98 end |
94 | 99 |
95 function commands.list(arg) | 100 function commands.list(arg) |