# HG changeset patch # User João Duarte # Date 1565992709 25200 # Node ID 4c755c2e630520791815b023fa446245c9763a89 # Parent 46a5f2bf5ee0e31999bc3bfc939c40a5ec690681 prosodyctl: Install, remove and list commands now use the call_luarocks function diff -r 46a5f2bf5ee0 -r 4c755c2e6305 prosodyctl --- a/prosodyctl Fri Aug 16 14:02:51 2019 -0700 +++ b/prosodyctl Fri Aug 16 14:58:29 2019 -0700 @@ -76,7 +76,7 @@ local show_yesno = prosodyctl.show_yesno; local show_prompt = prosodyctl.show_prompt; local read_password = prosodyctl.read_password; -local execute_command = prosodyctl.execute_command; +local call_luarocks = prosodyctl.call_luarocks; local jid_split = require "util.jid".prepped_split; @@ -90,8 +90,7 @@ show_usage([[install]], [[Installs a prosody/luarocks plugin]]); return 1; end - table.insert(arg, "install"); - execute_command(arg); + call_luarocks(arg[1], "install") end function commands.remove(arg) @@ -99,8 +98,7 @@ show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); return 1; end - table.insert(arg, "remove"); - execute_command(arg); + call_luarocks(arg[1], "remove") end function commands.list(arg) @@ -108,8 +106,7 @@ show_usage([[list]], [[Shows installed rocks]]); return 1; end - table.insert(arg, "list"); - execute_command(arg); + call_luarocks(arg[1], "list") end function commands.adduser(arg)