Software /
code /
prosody
Comparison
core/configmanager.lua @ 10198:83541f0ff14f
core.configmanager: Added support to 'complement_lua_path'
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Thu, 01 Aug 2019 09:21:10 -0700 |
parent | 9876:d812031c8716 |
child | 10206:46a5f2bf5ee0 |
comparison
equal
deleted
inserted
replaced
10197:91085371cfc5 | 10198:83541f0ff14f |
---|---|
13 | 13 |
14 local envload = require"util.envload".envload; | 14 local envload = require"util.envload".envload; |
15 local deps = require"util.dependencies"; | 15 local deps = require"util.dependencies"; |
16 local resolve_relative_path = require"util.paths".resolve_relative_path; | 16 local resolve_relative_path = require"util.paths".resolve_relative_path; |
17 local glob_to_pattern = require"util.paths".glob_to_pattern; | 17 local glob_to_pattern = require"util.paths".glob_to_pattern; |
18 local complement_lua_path = require"util.paths".complement_lua_path; | |
18 local path_sep = package.config:sub(1,1); | 19 local path_sep = package.config:sub(1,1); |
19 local get_traceback_table = require "util.debug".get_traceback_table; | 20 local get_traceback_table = require "util.debug".get_traceback_table; |
20 | 21 |
21 local encodings = deps.softreq"util.encodings"; | 22 local encodings = deps.softreq"util.encodings"; |
22 local nameprep = encodings and encodings.stringprep.nameprep or function (host) return host:lower(); end | 23 local nameprep = encodings and encodings.stringprep.nameprep or function (host) return host:lower(); end |
24 local _M = {}; | 25 local _M = {}; |
25 local _ENV = nil; | 26 local _ENV = nil; |
26 -- luacheck: std none | 27 -- luacheck: std none |
27 | 28 |
28 _M.resolve_relative_path = resolve_relative_path; -- COMPAT | 29 _M.resolve_relative_path = resolve_relative_path; -- COMPAT |
30 _M.complement_lua_path = complement_lua_path; | |
29 | 31 |
30 local parser = nil; | 32 local parser = nil; |
31 | 33 |
32 local config_mt = { __index = function (t, _) return rawget(t, "*"); end}; | 34 local config_mt = { __index = function (t, _) return rawget(t, "*"); end}; |
33 local config = setmetatable({ ["*"] = { } }, config_mt); | 35 local config = setmetatable({ ["*"] = { } }, config_mt); |