scripts/check_site.lua: use new format() function to simplify var_error()
This commit is contained in:
parent
5abddd2976
commit
16a78b4e9e
@ -119,13 +119,9 @@ local function conf_src(path)
|
||||
end
|
||||
|
||||
local function var_error(path, val, msg)
|
||||
if type(val) == 'string' then
|
||||
val = string.format('%q', val)
|
||||
end
|
||||
|
||||
local found = 'unset'
|
||||
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
|
||||
|
||||
config_error(conf_src(path), 'expected %s to %s, but it is %s', path_to_string(path), msg, found)
|
||||
|
Loading…
Reference in New Issue
Block a user