# HG changeset patch # User Kim Alvefur # Date 1601925449 -7200 # Node ID 624eafed3343dc44cf84be63c9238a6bfe479d03 # Parent 287d0d80aa5793c701b2506cf03266d4c7c44fdb util.prosodyctl: Flip argument order "verb subject" feels better than "subject verb", especially since the subject (module) is optional. diff -r 287d0d80aa57 -r 624eafed3343 prosodyctl --- a/prosodyctl Mon Oct 05 21:13:23 2020 +0200 +++ b/prosodyctl Mon Oct 05 21:17:29 2020 +0200 @@ -78,7 +78,7 @@ show_usage([[install]], [[Installs a prosody/luarocks plugin]]); return 1; end - call_luarocks(arg[1], "install") + call_luarocks("install", arg[1]); end function commands.remove(arg) @@ -86,7 +86,7 @@ show_usage([[remove]], [[Removes a module installed in the working directory's plugins folder]]); return 1; end - call_luarocks(arg[1], "remove") + call_luarocks("remove", arg[1]) end function commands.list(arg) @@ -94,7 +94,7 @@ show_usage([[list]], [[Shows installed rocks]]); return 1; end - call_luarocks(arg[1], "list") + call_luarocks("list", arg[1]) end function commands.adduser(arg) diff -r 287d0d80aa57 -r 624eafed3343 util/prosodyctl.lua --- a/util/prosodyctl.lua Mon Oct 05 21:13:23 2020 +0200 +++ b/util/prosodyctl.lua Mon Oct 05 21:17:29 2020 +0200 @@ -227,7 +227,7 @@ local render_cli = interpolation.new("%b{}", function (s) return "'"..s:gsub("'","'\\''").."'" end) -local function call_luarocks(mod, operation) +local function call_luarocks(operation, mod) local dir = get_path_custom_plugins(prosody.paths.plugins); if operation == "install" then show_message("Installing %s at %s", mod, dir);