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

scripts/check_site.lua: use new format() function to simplify var_error()

parent 5abddd29
No related branches found
No related tags found
No related merge requests found
...@@ -119,13 +119,9 @@ local function conf_src(path) ...@@ -119,13 +119,9 @@ local function conf_src(path)
end end
local function var_error(path, val, msg) local function var_error(path, val, msg)
if type(val) == 'string' then
val = string.format('%q', val)
end
local found = 'unset' local found = 'unset'
if val ~= nil then if val ~= nil then
found = string.format('%s (a %s value)', tostring(val), type(val)) found = string.format('%s (a %s value)', format(val), type(val))
end end
config_error(conf_src(path), 'expected %s to %s, but it is %s', path_to_string(path), msg, found) config_error(conf_src(path), 'expected %s to %s, but it is %s', path_to_string(path), msg, found)
......
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