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

build: target_config_check: dedup error messages

Certain error message (for example invalid package names) were emitted
once for each device.
parent 93791373
Branches
Tags
No related merge requests found
local ret = 0
local errors = {}
local function fail(...)
if ret == 0 then
ret = 1
if not next(errors) then
io.stderr:write('Configuration failed:', '\n')
end
io.stderr:write(' * ', string.format(...), '\n')
local msg = string.format(...)
if not errors[msg] then
errors[msg] = true
io.stderr:write(' * ', msg, '\n')
end
end
local function match_config(f)
......@@ -63,4 +66,6 @@ for config, v in pairs(lib.configs) do
end
end
os.exit(ret)
if next(errors) then
os.exit(1)
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment