# HG changeset patch # User João Duarte # Date 1563359462 25200 # Node ID 1e192e8d4e9d41d30717dc056a795b2325f8810a # Parent cf70deac27f6a2e2ca0774cfb5fb9040a98b67eb prosodyctl: Improved the 'list' command diff -r cf70deac27f6 -r 1e192e8d4e9d prosodyctl --- a/prosodyctl Wed Jul 17 03:20:08 2019 -0700 +++ b/prosodyctl Wed Jul 17 03:31:02 2019 -0700 @@ -164,7 +164,7 @@ end function commands.list(arg) - if not arg[1] or arg[1] == "--help" then + if arg[1] == "--help" then show_usage([[list]], [[Shows installed rocks]]); return 1; end @@ -174,10 +174,10 @@ if arg[1] and arg[1]:sub(1, #flag) == flag then local dir = arg[1]:match("=(.+)$") -- These extra double brackets allow us to correctly process names with spaces - os.execute("luarocks list --tree=".."'"..dir.."'") + os.execute("luarocks list --tree='"..dir.."'") return 0; else - os.execute("luarocks list --tree="..prosody.paths.data.."/rocks") + os.execute("luarocks list --tree="..prosody.paths.plugins) return 0; end end