Commit 44e82489 authored by Leo's avatar Leo

secfixes-check: add support for exiting with a proper error code

parent 3ed1d41d
......@@ -4,6 +4,7 @@ function violation(str, line, tag, sevcer)
if os.getenv('SKIP_AL'..tag) then
return
end
ret = ret + 1
io.stderr:write(sevcer..":".."[AL"..tag.."]:"..apkbuild..":"..line..":"..str.."\n")
end
......@@ -188,6 +189,13 @@ function verify(str)
end
end
---
-- Value we will return, if we return anything but 0 it means
-- we found policy violations, the value is incremented by 1
-- with each policy violation
---
ret = 0
for i = 1,#arg do
apkbuild = arg[i]
......@@ -219,3 +227,4 @@ for i = 1,#arg do
end
end
end
os.exit(ret)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment