# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1648464092 -3600
# Node ID 1ef89371531156571e82a45aa45855f61e5d6bd5
# Parent  a698f65df4537a67f66b985c8ef8c50838a79c51
configmanager: Add method to report loaded config files (part of #1729 fix)

diff -r a698f65df453 -r 1ef893715311 core/configmanager.lua
--- a/core/configmanager.lua	Mon Mar 28 11:08:18 2022 +0100
+++ b/core/configmanager.lua	Mon Mar 28 11:41:32 2022 +0100
@@ -31,6 +31,7 @@
 
 local config_mt = { __index = function (t, _) return rawget(t, "*"); end};
 local config = setmetatable({ ["*"] = { } }, config_mt);
+local files = {};
 
 -- When host not found, use global
 local host_mt = { __index = function(_, k) return config["*"][k] end }
@@ -98,6 +99,10 @@
 	end
 end
 
+function _M.files()
+	return files;
+end
+
 -- Built-in Lua parser
 do
 	local pcall = _G.pcall;
@@ -253,6 +258,8 @@
 			return nil, err;
 		end
 
+		t_insert(files, config_file);
+
 		return true, warnings;
 	end