Skip to content
Snippets Groups Projects
Commit 54921e26 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Prepend ./ to package.path / package.cpath

parent 71521a7c
No related branches found
No related tags found
No related merge requests found
......@@ -232,6 +232,8 @@ tarantool_lua_setpaths(struct lua_State *L)
const char *home = getenv("HOME");
lua_getglobal(L, "package");
int top = lua_gettop(L);
lua_pushliteral(L, "./?.lua;");
lua_pushliteral(L, "./?/init.lua;");
if (home != NULL) {
lua_pushstring(L, home);
lua_pushliteral(L, "/.luarocks/share/lua/5.1/?.lua;");
......@@ -247,6 +249,7 @@ tarantool_lua_setpaths(struct lua_State *L)
lua_concat(L, lua_gettop(L) - top);
lua_setfield(L, top, "path");
lua_pushliteral(L, "./?.so;");
if (home != NULL) {
lua_pushstring(L, home);
lua_pushliteral(L, "/.luarocks/lib/lua/5.1/?.so;");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment