add nil check, remove 'self' as argument, just get it through action.current()
This commit is contained in:
parent
7ce257badc
commit
53e4145765
@ -214,7 +214,11 @@
|
||||
-- True if the feature is supported, false otherwise.
|
||||
---
|
||||
|
||||
function action.supports(self, feature)
|
||||
function action.supports(feature)
|
||||
if not feature then
|
||||
return true
|
||||
end
|
||||
local self = action.current()
|
||||
if not self then
|
||||
return false
|
||||
end
|
||||
@ -232,11 +236,11 @@
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
--
|
||||
-- Determines if an action supports a particular configuration.
|
||||
-- @return
|
||||
-- True if the configuration is supported, false otherwise.
|
||||
--
|
||||
--
|
||||
function premake.action.supportsconfig(action, cfg)
|
||||
if not action then
|
||||
return false
|
||||
|
@ -117,11 +117,15 @@
|
||||
function p.project.bake(self)
|
||||
local sln = self.solution
|
||||
|
||||
if not premake.action.supports(premake.action.current(), self.language) then
|
||||
-- check if the language for this project is supported by the action.
|
||||
|
||||
if not p.action.supports(self.language) then
|
||||
printf(" Unsupported language '%s' used for '%s'.", self.language, self.name)
|
||||
end
|
||||
|
||||
if not premake.action.supports(premake.action.current(), self.kind) then
|
||||
-- check if the kind for this project is supported by the action.
|
||||
|
||||
if not p.action.supports(self.kind) then
|
||||
printf(" Unsupported kind '%s' used for '%s'.", self.kind, self.name)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user