From 16a78b4e9e8b1d135851201ebe3dbbefe52c51cf Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 28 Apr 2019 19:17:47 +0200 Subject: [PATCH] scripts/check_site.lua: use new format() function to simplify var_error() --- scripts/check_site.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/check_site.lua b/scripts/check_site.lua index 0bac55de..d4a9b571 100644 --- a/scripts/check_site.lua +++ b/scripts/check_site.lua @@ -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)