From 184b2a45b80a03728038643d0c5ec1cfd70e617f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Wed, 17 Jul 2019 03:31:02 -0700 Subject: prosodyctl: Improved the 'list' command --- prosodyctl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prosodyctl b/prosodyctl index f04c1d46..750c84e4 100755 --- a/prosodyctl +++ b/prosodyctl @@ -164,7 +164,7 @@ function commands.install(arg) 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 @@ function commands.list(arg) 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 -- cgit v1.2.3