Add _MAIN_SCRIPT_DIR to module search paths on startup

This commit is contained in:
Jason Perkins 2015-03-22 12:44:44 -04:00
parent 47181031fd
commit d653b4e19a

View File

@ -32,10 +32,10 @@
m.elements = function() m.elements = function()
return { return {
m.installModuleLoader, m.installModuleLoader,
m.locateUserScript,
m.prepareEnvironment, m.prepareEnvironment,
m.preloadModules, m.preloadModules,
m.runSystemScript, m.runSystemScript,
m.locateUserScript,
m.prepareAction, m.prepareAction,
m.runUserScript, m.runUserScript,
m.checkInteractive, m.checkInteractive,
@ -102,7 +102,7 @@
function m.prepareEnvironment() function m.prepareEnvironment()
math.randomseed(os.time()) math.randomseed(os.time())
_PREMAKE_DIR = path.getdirectory(_PREMAKE_COMMAND) _PREMAKE_DIR = path.getdirectory(_PREMAKE_COMMAND)
premake.path = premake.path .. ";" .. _PREMAKE_DIR premake.path = premake.path .. ";" .. _PREMAKE_DIR .. ";" .. _MAIN_SCRIPT_DIR
end end