Fix a tiny ackbuilder bug where you can't set properties to false.
This commit is contained in:
parent
ae76564657
commit
48480dcae5
|
@ -7,6 +7,7 @@
|
||||||
-- is = { set of rule types which made the target }
|
-- is = { set of rule types which made the target }
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
|
local posix = require("posix")
|
||||||
local emitter = {}
|
local emitter = {}
|
||||||
local rules = {}
|
local rules = {}
|
||||||
local targets = {}
|
local targets = {}
|
||||||
|
@ -544,7 +545,7 @@ local function definerule(rulename, types, cb)
|
||||||
|
|
||||||
local args = {}
|
local args = {}
|
||||||
for propname, typespec in pairs(types) do
|
for propname, typespec in pairs(types) do
|
||||||
if not e[propname] then
|
if e[propname] == nil then
|
||||||
if not typespec.optional and (typespec.default == nil) then
|
if not typespec.optional and (typespec.default == nil) then
|
||||||
error(string.format("missing mandatory property '%s'", propname))
|
error(string.format("missing mandatory property '%s'", propname))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue