gluon-core: gluon.platform: allow omitting target and subtarget

Allow wildcard matches on all subtargets of a target, or a full wildcard
always returning true when no arguments are passed.
This commit is contained in:
Matthias Schiffer 2020-03-12 00:27:05 +01:00
parent 75684ecf37
commit 59d182fe54
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -7,11 +7,11 @@ local M = setmetatable({}, {
})
function M.match(target, subtarget, boards)
if M.get_target() ~= target then
if target and M.get_target() ~= target then
return false
end
if M.get_subtarget() ~= subtarget then
if subtarget and M.get_subtarget() ~= subtarget then
return false
end