diff --git a/spec/config/errors.lua b/spec/config/errors.lua index 45d2ea7ed..25909f4e5 100644 --- a/spec/config/errors.lua +++ b/spec/config/errors.lua @@ -1,13 +1,12 @@ describe("config", function() - it("should report unknown keys in tlconfig.lua", function() + it("should not report unknown keys in tlconfig.lua", function() util.run_mock_project(finally, { dir_structure = { ["tlconfig.lua"] = [[return { foo = "hello" }]], }, cmd = "check", args = { "tlconfig.lua" }, - cmd_output = [[* in key "foo": unknown config key 'foo' -======================================== + cmd_output = [[======================================== Type checked tlconfig.lua 0 errors detected -- you can use: diff --git a/tl b/tl index 88b690217..3e4a69ea4 100755 --- a/tl +++ b/tl @@ -337,7 +337,7 @@ local function validate_config(config) if k == "preload_modules" then fail(k, "this key is no longer supported. To load a definition globally into the environment, use global_env_def.") elseif not valid_keys[k] then - warning(k, "unknown config key '" .. k .. "'") + -- skip invalid keys, to be used by other tools elseif type(valid_keys[k]) == "table" then if not valid_keys[k][v] then fail(k, "expected one of: %s", table.concat(keys(valid_keys[k][v]), ", "))