From d66c741396fa81168fc70bb0e81689fc2ab2581f Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 21 Feb 2018 01:52:42 +0000 Subject: [PATCH] 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. --- stand/lua/config.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 40514c741858..84aedd3eb109 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -423,17 +423,18 @@ function config.load(file) end 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 local f = loader.getenv("loader_conf_files") if f ~= nil then for name in f:gmatch("([%w%p]+)%s*") do - if not config.parse(name) then - -- XXX TODO: Ditto the above --- print("Failed to parse configuration: '" .. --- name .. "'") + -- These may or may not exist, and that's ok. Do a + -- silent parse so that we complain on parse errors but + -- not for them simply not existing. + if not config.parse(name, true) then + print("Failed to parse configuration: '" .. + name .. "'") end end end