aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-07-31 05:47:36 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-07-31 05:47:36 -0700
commit1e03cec66433732be858cca013ce8c9f84169c0f (patch)
tree46630d4674338d52b21ea27ba4d5ff6976bfb9e3
parent8398643365bfd23a8b78c45946915c403882cbee (diff)
downloadprosody-1e03cec66433732be858cca013ce8c9f84169c0f.tar.gz
prosody-1e03cec66433732be858cca013ce8c9f84169c0f.zip
prosodyctl: Swapped prints for the show_message function at the install/remove commands
-rwxr-xr-xprosodyctl9
1 files changed, 4 insertions, 5 deletions
diff --git a/prosodyctl b/prosodyctl
index 9990a485..72f7cbb5 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -95,12 +95,12 @@ function commands.install(arg)
local flag = "--tree="
if arg[1] and arg[1]:sub(1, #flag) == flag then
local dir = arg[1]:match("=(.+)$")
- print("Installing module "..arg[2].." at "..dir)
+ show_message("Installing module %s at %s", arg[2], dir)
os.execute("luarocks --tree='"..dir.."' --server='http://localhost/' install "..arg[2])
show_module_configuration_help(arg[2]);
return 0;
else
- print("Installing module "..arg[1].." at "..installer_plugin_path)
+ show_message("Installing module %s at %s", arg[1], installer_plugin_path)
-- I've build a local server to upload some new rockspecs, like mod_smacks'. We can replace this server by one from
-- prosody's, where we can oficially disbrute rocks/rockspecs for all modules
os.execute("luarocks --tree='"..installer_plugin_path.."' --server='http://localhost/' install "..arg[1])
@@ -120,13 +120,12 @@ function commands.remove(arg)
-- I'm considering this optional flag comes first
if arg[1] and arg[1]:sub(1, #flag) == flag then
local dir = arg[1]:match("=(.+)$")
- print("Removing module "..arg[2].." at "..dir)
+ show_message("Removing module %s at %s", arg[2], dir)
os.execute("luarocks remove --tree='"..dir.."' "..arg[2])
return 0;
else
- print("Removing "..arg[1].." from "..installer_plugin_path)
+ show_message("Removing %s from %s", arg[1], installer_plugin_path)
os.execute("luarocks --tree='"..installer_plugin_path.."' remove "..arg[1])
- print("Done!")
return 0;
end
end