Changeset

12954:4f2accd99373

executables: Invoke loader to allow mixing of old and new import style Now both require"util.foo" and require"prosody.util.foo" should be equivalent.
author Kim Alvefur <zash@zash.se>
date Fri, 17 Mar 2023 16:29:07 +0100
parents 12953:ebe3b2f96cad
children 12955:d32926897ca4
files prosody prosodyctl
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosody	Tue Mar 21 14:33:29 2023 +0000
+++ b/prosody	Fri Mar 17 16:29:07 2023 +0100
@@ -51,6 +51,10 @@
 	return os.exit(1);
 end
 
+if not pcall(require, "prosody.loader") then
+	pcall(require, "loader");
+end
+
 local startup = require "util.startup";
 local async = require "util.async";
 
--- a/prosodyctl	Tue Mar 21 14:33:29 2023 +0000
+++ b/prosodyctl	Fri Mar 17 16:29:07 2023 +0100
@@ -51,6 +51,10 @@
 	return os.exit(1);
 end
 
+if not pcall(require, "prosody.loader") then
+	pcall(require, "loader");
+end
+
 local startup = require "util.startup";
 startup.prosodyctl();