Skip to content
Snippets Groups Projects
Commit 4d98fbb1 authored by kb-light's avatar kb-light
Browse files

scripts: update need_string_array() to work as expected

parent 21e03321
No related branches found
No related tags found
No related merge requests found
......@@ -133,8 +133,9 @@ function need_one_of(varname, array, required)
end
function need_string_array(varname, required)
return assert(pcall(need_array, varname, function(e) assert_type(e, 'string') end, required),
"site.conf error: expected `" .. varname .. "' to be a string array")
local ok, var = pcall(need_array, varname, function(e) assert_type(e, 'string') end, required)
assert(ok, "site.conf error: expected `" .. varname .. "' to be a string array")
return var
end
function need_array_of(varname, array, required)
......
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