aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2019-03-20 12:45:08 +0000
committerMatthew Wild <mwild1@gmail.com>2019-03-20 12:45:08 +0000
commit7dfdcd5e09abe4165e13e6a741f8e04cf3e6082d (patch)
tree60b6975668500efdb5995d86d4fb879c56873240 /core
parent1e6c93ec05b5aba14b05c01a3a8cac39722a9849 (diff)
downloadprosody-7dfdcd5e09abe4165e13e6a741f8e04cf3e6082d.tar.gz
prosody-7dfdcd5e09abe4165e13e6a741f8e04cf3e6082d.zip
configmanager: Pass through warnings from included files
Diffstat (limited to 'core')
-rw-r--r--core/configmanager.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 41034df8..090a6a0a 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -7,8 +7,8 @@
--
local _G = _G;
-local setmetatable, rawget, rawset, io, os, error, dofile, type, pairs =
- setmetatable, rawget, rawset, io, os, error, dofile, type, pairs;
+local setmetatable, rawget, rawset, io, os, error, dofile, type, pairs, ipairs =
+ setmetatable, rawget, rawset, io, os, error, dofile, type, pairs, ipairs;
local format, math_max, t_insert = string.format, math.max, table.insert;
local envload = require"util.envload".envload;
@@ -212,6 +212,11 @@ do
if f then
local ret, err = parser.load(f:read("*a"), file, config_table);
if not ret then error(err:gsub("%[string.-%]", file), 0); end
+ if err then
+ for _, warning in ipairs(err) do
+ t_insert(warnings, warning);
+ end
+ end
end
if not f then error("Error loading included "..file..": "..err, 0); end
return f, err;