"not" binds higher, turning these expressions into false == "string" on
errors.
src.tag not being set causes a stack trace later on.
A regression test has been added.
Signed-off-by: Tobias Ulmer <tu@emlix.com>
if not src.branch then
e:append("source has no `branch' attribute")
end
- if not type(src.tag) == "string" then
+ if type(src.tag) ~= "string" then
e:append("source has no `tag' attribute or tag attribute has wrong type")
end
if not src.module then
if not src.branch then
e:append("source has no `branch' attribute")
end
- if not type(src.tag) == "string" then
+ if type(src.tag) ~= "string" then
e:append("source has no `tag' attribute or tag attribute has wrong type")
end
- if not type(src.workingcopy_subdir) == "string" then
+ if type(src.workingcopy_subdir) ~= "string" then
e2lib.warnf("WDEFAULT", "in source %s", sourcename)
e2lib.warnf("WDEFAULT",
" workingcopy_subdir defaults to the branch: %s", src.branch)