Mercurial > prosody-hg
comparison core/configmanager.lua @ 13840:1b4f2d010141 13.0
configmanager: Emit config warning when referencing non-existent value
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 10 Apr 2025 11:19:48 +0100 |
| parents | 994ea8d54b72 |
| children | f0d854c63c8d |
comparison
equal
deleted
inserted
replaced
| 13838:a93e7310bfcd | 13840:1b4f2d010141 |
|---|---|
| 225 return setmetatable({ | 225 return setmetatable({ |
| 226 config_table = config_table; | 226 config_table = config_table; |
| 227 host = env.__currenthost or "*"; | 227 host = env.__currenthost or "*"; |
| 228 option_name = k; | 228 option_name = k; |
| 229 }, config_option_proxy_mt); | 229 }, config_option_proxy_mt); |
| 230 elseif val == nil then | |
| 231 t_insert( | |
| 232 warnings, | |
| 233 ("%s: %d: unrecognized value: %s (you may be missing quotes around it)"):format( | |
| 234 config_file, | |
| 235 get_line_number(config_file), | |
| 236 k | |
| 237 ) | |
| 238 ); | |
| 230 end | 239 end |
| 240 | |
| 231 return val; | 241 return val; |
| 232 end | 242 end |
| 233 | 243 |
| 234 if g_val ~= nil then | 244 if g_val ~= nil then |
| 235 t_insert( | 245 t_insert( |
