Merge pull request #866 from Blizzard/fix-istarget-ishost
fix os.istarget and os.ishost to use the systemTags table as well.
This commit is contained in:
commit
82f04b8b1d
@ -222,7 +222,8 @@
|
||||
--
|
||||
|
||||
function os.istarget(id)
|
||||
return (os.target():lower() == id:lower())
|
||||
local tags = os.getSystemTags(os.target())
|
||||
return table.contains(tags, id:lower())
|
||||
end
|
||||
|
||||
function os.is(id)
|
||||
@ -237,7 +238,8 @@
|
||||
--
|
||||
|
||||
function os.ishost(id)
|
||||
return (os.host():lower() == id:lower())
|
||||
local tags = os.getSystemTags(os.host())
|
||||
return table.contains(tags, id:lower())
|
||||
end
|
||||
|
||||
|
||||
@ -732,5 +734,5 @@
|
||||
}
|
||||
|
||||
function os.getSystemTags(name)
|
||||
return os.systemTags[name] or name
|
||||
return os.systemTags[name:lower()] or { name:lower() }
|
||||
end
|
||||
|
Reference in New Issue
Block a user