diff --git a/src/_premake_main.lua b/src/_premake_main.lua index 2689646b..033ecf83 100644 --- a/src/_premake_main.lua +++ b/src/_premake_main.lua @@ -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 diff --git a/src/base/action.lua b/src/base/action.lua index 57921082..6becbdb5 100644 --- a/src/base/action.lua +++ b/src/base/action.lua @@ -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