Fix deprecated action message
This commit is contained in:
parent
3dd3166c14
commit
5f338b665f
@ -39,8 +39,7 @@
|
||||
-- The "next-gen" actions have now replaced their deprecated counterparts.
|
||||
-- Provide a warning for a little while before I remove them entirely.
|
||||
if _ACTION:endswith("ng") then
|
||||
_ACTION = _ACTION:sub(1, -3)
|
||||
print(string.format("** Warning: '%sng' has been deprecated; use '%s' instead", _ACTION, _ACTION))
|
||||
print(string.format("** Warning: '%s' has been deprecated; use '%s' instead", _ACTION, _ACTION:sub(1, -3)))
|
||||
end
|
||||
|
||||
-- Set up the environment for the chosen action early, so side-effects
|
||||
|
@ -109,6 +109,11 @@
|
||||
--
|
||||
|
||||
function premake.action.get(name)
|
||||
-- "Next-gen" actions are deprecated
|
||||
if name:endswith("ng") then
|
||||
name = name:sub(1, -3)
|
||||
end
|
||||
|
||||
return premake.action.list[name]
|
||||
end
|
||||
|
||||
@ -142,6 +147,7 @@
|
||||
|
||||
function premake.action.set(name)
|
||||
_ACTION = name
|
||||
|
||||
-- Some actions imply a particular operating system
|
||||
local action = premake.action.get(name)
|
||||
if action then
|
||||
|
Loading…
Reference in New Issue
Block a user