util/xpcall.lua
author Kim Alvefur <zash@zash.se>
Thu, 20 Oct 2022 17:37:33 +0200
changeset 12790 5d4957c8a972
parent 9564 cfc7b2f7251e
child 12979 d10957394a3c
permissions -rw-r--r--
util.prosodyctl.cert: Remove Lua 5.1 os.execute() return value compat

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};