lualoader: Output "Failed to parse" messages
I can't find any good reason these aren't enabled, so enable them. The silent runs will only return false on actual parse errors, so it's ok to be loud about those failures.
This commit is contained in:
parent
062d62c9b3
commit
d66c741396
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329689
@ -423,17 +423,18 @@ function config.load(file)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not config.parse(file) then
|
if not config.parse(file) then
|
||||||
-- XXX TODO: Why is this commented out?
|
print("Failed to parse configuration: '" .. file .. "'")
|
||||||
-- print("Failed to parse configuration: '" .. file .. "'")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local f = loader.getenv("loader_conf_files")
|
local f = loader.getenv("loader_conf_files")
|
||||||
if f ~= nil then
|
if f ~= nil then
|
||||||
for name in f:gmatch("([%w%p]+)%s*") do
|
for name in f:gmatch("([%w%p]+)%s*") do
|
||||||
if not config.parse(name) then
|
-- These may or may not exist, and that's ok. Do a
|
||||||
-- XXX TODO: Ditto the above
|
-- silent parse so that we complain on parse errors but
|
||||||
-- print("Failed to parse configuration: '" ..
|
-- not for them simply not existing.
|
||||||
-- name .. "'")
|
if not config.parse(name, true) then
|
||||||
|
print("Failed to parse configuration: '" ..
|
||||||
|
name .. "'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user