Commits

Jason Perkins  committed 2fc425d

Fix deprecated action message

  • Participants
  • Parent commits d461598

Comments (0)

Files changed (2)

File src/_premake_main.lua

 		-- 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

File src/base/action.lua

 --
 
 	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
 
 
 	function premake.action.set(name)
 		_ACTION = name
+		
 		-- Some actions imply a particular operating system
 		local action = premake.action.get(name)
 		if action then