Diff

prosodyctl @ 12802:4a8740e01813

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:10:54 +0100
parent 12589:39ae08180c81
child 12864:9f9633364044
line wrap: on
line diff
--- a/prosodyctl	Mon Dec 12 20:40:23 2022 +0100
+++ b/prosodyctl	Mon Dec 12 07:10:54 2022 +0100
@@ -44,6 +44,13 @@
 
 -----------
 
+-- Check before first require, to preempt the probable failure
+if _VERSION < "Lua 5.2" then
+	io.stderr:write("Prosody is no longer compatible with Lua 5.1\n")
+	io.stderr:write("See https://prosody.im/doc/depends#lua for more information\n")
+	return os.exit(1);
+end
+
 local startup = require "util.startup";
 startup.prosodyctl();
 
@@ -573,7 +580,7 @@
 end
 -- ejabberdctl compatibility
 
-local unpack = table.unpack or unpack; -- luacheck: ignore 113
+local unpack = table.unpack;
 
 function commands.register(arg)
 	local user, host, password = unpack(arg);