aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo?o Duarte <jvsDuarte08@gmail.com>2019-07-24 11:26:29 -0700
committerJo?o Duarte <jvsDuarte08@gmail.com>2019-07-24 11:26:29 -0700
commitf98d9a47d95c36380545c180ed32e9b0b14f9138 (patch)
tree9e9725e628adf6c15708ea0d9d6c0f47c030a919
parent5fa62c1c2a1d7ac5d17526cfdf1d1d6faa8288b2 (diff)
downloadprosody-f98d9a47d95c36380545c180ed32e9b0b14f9138.tar.gz
prosody-f98d9a47d95c36380545c180ed32e9b0b14f9138.zip
prosodyctl: Custom plugins paths are now retrieved by an helper function
-rwxr-xr-xprosodyctl17
1 files changed, 3 insertions, 14 deletions
diff --git a/prosodyctl b/prosodyctl
index 777b2c30..c50900f2 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -90,12 +90,7 @@ function commands.install(arg)
show_usage([[make]], [[Installs a prosody/luarocks plugin]]);
return 1;
end
- local installer_plugin_path
- -- 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 installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins)
-- I'm considering this optional flag comes first
local flag = "--tree="
if arg[1] and arg[1]:sub(1, #flag) == flag then
@@ -120,10 +115,7 @@ function commands.remove(arg)
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 installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins)
local flag = "--tree="
-- I'm considering this optional flag comes first
if arg[1] and arg[1]:sub(1, #flag) == flag then
@@ -145,10 +137,7 @@ function commands.list(arg)
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 installer_plugin_path = prosodyctl.get_path_custom_plugins(prosody.paths.plugins)
local flag = "--tree="
-- I'm considering this optional flag comes first
if arg[1] and arg[1]:sub(1, #flag) == flag then