From 763a2bb0ed5f2c134c4efa0dfbcfa8ff73a0530f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 17 Mar 2023 16:29:07 +0100 Subject: 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. --- prosody | 4 ++++ prosodyctl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/prosody b/prosody index eaac3dff..b300059f 100755 --- a/prosody +++ b/prosody @@ -51,6 +51,10 @@ if _VERSION < "Lua 5.2" then 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"; diff --git a/prosodyctl b/prosodyctl index 337b3593..55d71cf6 100755 --- a/prosodyctl +++ b/prosodyctl @@ -51,6 +51,10 @@ if _VERSION < "Lua 5.2" then return os.exit(1); end +if not pcall(require, "prosody.loader") then + pcall(require, "loader"); +end + local startup = require "util.startup"; startup.prosodyctl(); -- cgit v1.2.3