# HG changeset patch # User João Duarte # Date 1563990365 25200 # Node ID 8fd6fb34d9c513f9f5750b909464abaee7e5f3bf # Parent d145eb696475415eb336c5508db0caebd7e62998 prosodyctl: Updated the remove command to use the new directory for custom plugins diff -r d145eb696475 -r 8fd6fb34d9c5 prosodyctl --- a/prosodyctl Wed Jul 24 10:43:28 2019 -0700 +++ b/prosodyctl Wed Jul 24 10:46:05 2019 -0700 @@ -119,6 +119,11 @@ 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 @@ 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