aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-07-24 10:46:05 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-07-24 10:46:05 -0700
commitcf695f88f1bc15c7ccb69c65aee555579ad80da8 (patch)
treece910866e1822a6fdf2b401342f5445ba6efc2db /prosodyctl
parent27e711c5876b0008fa871b26787c0c134e90d744 (diff)
downloadprosody-cf695f88f1bc15c7ccb69c65aee555579ad80da8.tar.gz
prosody-cf695f88f1bc15c7ccb69c65aee555579ad80da8.zip
prosodyctl: Updated the remove command to use the new directory for custom plugins
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl9
1 files changed, 7 insertions, 2 deletions
diff --git a/prosodyctl b/prosodyctl
index 1c702576..33f58fc1 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -119,6 +119,11 @@ function commands.remove(arg)
show_usage([[make]], [[Removes a module installed in the wroking directory's plugins folder]]);
return 1;
end
+ -- I'm considering that we are using just one path to custom plugins, and it is the first in prosody.paths.plugins, for now
+ for path in prosody.paths.plugins:gmatch("[^;]+") do
+ installer_plugin_path = path
+ break
+ end
local flag = "--tree="
-- I'm considering this optional flag comes first
if arg[1] and arg[1]:sub(1, #flag) == flag then
@@ -127,8 +132,8 @@ function commands.remove(arg)
os.execute("luarocks remove --tree='"..dir.."' "..arg[2])
return 0;
else
- print("Removing "..arg[1].." from "..prosody.paths.plugins)
- os.execute("luarocks --tree='"..prosody.paths.plugins.."' remove "..arg[1])
+ print("Removing "..arg[1].." from "..installer_plugin_path)
+ os.execute("luarocks --tree='"..installer_plugin_path.."' remove "..arg[1])
print("Done!")
return 0;
end