Skip to content
Snippets Groups Projects
Unverified Commit aeae9df0 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

check_site: improve error message for unset values

parent 3519f4e6
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,12 @@ local function var_error(path, val, msg)
src = site_src()
end
config_error(src, 'expected %s to %s, but it is %s (a %s value)', path_to_string(path), msg, tostring(val), type(val))
local found = 'unset'
if val ~= nil then
found = string.format('%s (a %s value)', tostring(val), type(val))
end
config_error(src, 'expected %s to %s, but it is %s', path_to_string(path), msg, found)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment