From 1d37b3a8b3d40f3c7ca0ba325714cfad9f06bda9 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Wed, 25 Oct 2017 14:35:53 +0300 Subject: [PATCH] Add /usr/local/share/lua/5.1 to default LUA_PATH. The path is the default LuaRocks global install root, so it is a frequent request to have it in the default LUA_PATH in sysbench. --- src/sb_lua.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sb_lua.c b/src/sb_lua.c index fd29b60..4bfb434 100644 --- a/src/sb_lua.c +++ b/src/sb_lua.c @@ -587,7 +587,10 @@ static void sb_lua_set_paths(lua_State *L) lua_pushliteral(L, "/.luarocks/share/lua/?/init.lua;"); } + lua_pushliteral(L, "/usr/local/share/lua/5.1/?.lua;"); + lua_pushliteral(L, DATADIR "/?.lua;"); + lua_concat(L, lua_gettop(L) - top); /* Mimic the default Lua behavior with respect to LUA_PATH and ';;' */