membphis commented on issue #1351: feature: remove `lua` dir. URL: https://github.com/apache/incubator-apisix/pull/1351#issuecomment-606424584 @moonming you can make a try with this patch: ```diff diff --git a/bin/apisix b/bin/apisix index e00e9af6..871de12d 100755 --- a/bin/apisix +++ b/bin/apisix @@ -39,9 +39,7 @@ local pkg_path_org = package.path local apisix_home = "/usr/local/apisix" local pkg_cpath = apisix_home .. "/deps/lib64/lua/5.1/?.so;" .. apisix_home .. "/deps/lib/lua/5.1/?.so;;" -local pkg_path = apisix_home .. "/deps/share/lua/5.1/apisix/?.lua;" - .. "/usr/local/share/lua/5.1/apisix/?.lua;" - .. apisix_home .. "/deps/share/lua/5.1/?.lua;;" +local pkg_path = apisix_home .. "/deps/share/lua/5.1/?.lua;;" -- only for developer, use current folder as working space local is_root_path = false @@ -58,7 +56,7 @@ if script_path:sub(1, 2) == './' then pkg_cpath = apisix_home .. "/deps/lib64/lua/5.1/?.so;" .. apisix_home .. "/deps/lib/lua/5.1/?.so;" - pkg_path = apisix_home .. "/apisix/?.lua;" + pkg_path = apisix_home .. "/?/init.lua;" .. apisix_home .. "/deps/share/lua/5.1/?.lua;;" end -- print("apisix_home: ", apisix_home) @@ -114,7 +112,7 @@ env APISIX_PROFILE; {% if stream_proxy then %} stream { lua_package_path "$prefix/deps/share/lua/5.1/?.lua;]=] - .. [=[{*apisix_lua_home*}/apisix/?.lua;;{*lua_path*};"; + .. [=[{*apisix_lua_home*}/?.lua;;{*lua_path*};"; lua_package_cpath "$prefix/deps/lib64/lua/5.1/?.so;]=] .. [=[$prefix/deps/lib/lua/5.1/?.so;;]=] .. [=[{*lua_cpath*};"; @@ -167,7 +165,7 @@ stream { http { lua_package_path "$prefix/deps/share/lua/5.1/?.lua;]=] - .. [=[{*apisix_lua_home*}/apisix/?.lua;;{*lua_path*};"; + .. [=[{*apisix_lua_home*}/?.lua;;{*lua_path*};"; lua_package_cpath "$prefix/deps/lib64/lua/5.1/?.so;]=] .. [=[$prefix/deps/lib/lua/5.1/?.so;;]=] .. [=[{*lua_cpath*};"; ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services