diff options
author | Kim Alvefur <zash@zash.se> | 2023-03-17 16:29:07 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-03-17 16:29:07 +0100 |
commit | 763a2bb0ed5f2c134c4efa0dfbcfa8ff73a0530f (patch) | |
tree | 6b4aeda1a261bf2ca801731ac281c790810e0b22 | |
parent | fc80e83b42c04f8b3407487a97e663ae0b4d82fc (diff) | |
download | prosody-763a2bb0ed5f2c134c4efa0dfbcfa8ff73a0530f.tar.gz prosody-763a2bb0ed5f2c134c4efa0dfbcfa8ff73a0530f.zip |
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.
-rwxr-xr-x | prosody | 4 | ||||
-rwxr-xr-x | prosodyctl | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -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"; @@ -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(); |