Changeset

10189:d311168c71d1

util.prosodyctl: The check_flags function now considers that a module, if given, is specified at the penultimate argument it receives
author João Duarte <jvsDuarte08@gmail.com>
date Wed, 31 Jul 2019 11:08:43 -0700
parents 10188:dbd9880bf5c6
children 10190:f506964a1123
files util/prosodyctl.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl.lua	Wed Jul 31 11:01:36 2019 -0700
+++ b/util/prosodyctl.lua	Wed Jul 31 11:08:43 2019 -0700
@@ -301,9 +301,9 @@
 	-- There might not be any argument when the list command is calling this function
 	if arg[1] and arg[1]:sub(1, #flag) == flag then
 		local dir = arg[1]:match("=(.+)$")
-		return true, arg[2], dir;
+		return true, arg[#arg-1], dir;
 	end
-	return false, arg[1]
+	return false, arg[#arg-1];
 end
 
 local function call_luarocks(operation, mod, dir)