diff --git a/src/base/action.lua b/src/base/action.lua index bcb9e001..e40baf23 100644 --- a/src/base/action.lua +++ b/src/base/action.lua @@ -145,7 +145,7 @@ local i = 0 return function() i = i + 1 - return act._list[keys[i]] + return action._list[keys[i]] end end diff --git a/src/host/lua_auxlib.c b/src/host/lua_auxlib.c index 29c091d4..f2807713 100644 --- a/src/host/lua_auxlib.c +++ b/src/host/lua_auxlib.c @@ -75,6 +75,12 @@ LUALIB_API int luaL_loadfile (lua_State* L, const char* filename) if (z == OKAY) { lua_pushcclosure(L, chunk_wrapper, 2); } + else { + lua_pushstring(L, "cannot open "); + lua_pushstring(L, filename); + lua_pushstring(L, ": No such file or directory"); + lua_concat(L, 3); + } return z; } diff --git a/tests/test b/tests/test index e9f1d7f1..2dce734f 100755 --- a/tests/test +++ b/tests/test @@ -1,2 +1,2 @@ #!/bin/sh -cd `dirname $0` && ../bin/debug/premake5 /file=../premake5.lua /scripts=../src $1 $2 $3 test +cd `dirname $0` && ../bin/debug/premake5 /file=../premake5.lua /scripts=.. $1 $2 $3 test diff --git a/tests/test.bat b/tests/test.bat index 043871ef..f80ac6ea 100644 --- a/tests/test.bat +++ b/tests/test.bat @@ -1,4 +1,4 @@ @echo off pushd "%~dp0" -..\bin\debug\premake5.exe /scripts=..\src /file=..\premake5.lua %* test +..\bin\debug\premake5.exe /scripts=.. /file=..\premake5.lua %* test popd