diff --git a/apisix/cli/env.lua b/apisix/cli/env.lua index 0fc45f0e02f6f..2ca8c3eb1bbb1 100644 --- a/apisix/cli/env.lua +++ b/apisix/cli/env.lua @@ -45,6 +45,7 @@ return function (apisix_home, pkg_cpath_org, pkg_path_org) .. apisix_home .. "/deps/lib/lua/5.1/?.so;" local pkg_path = apisix_home .. "/?/init.lua;" + .. apisix_home .. "/deps/share/lua/5.1/?/init.lua;" .. apisix_home .. "/deps/share/lua/5.1/?.lua;;" package.cpath = pkg_cpath .. package.cpath diff --git a/t/APISIX.pm b/t/APISIX.pm index b3b7e60ac4a81..2ff2e036573ea 100644 --- a/t/APISIX.pm +++ b/t/APISIX.pm @@ -150,7 +150,7 @@ _EOC_ my $stream_enable = $block->stream_enable; my $stream_config = $block->stream_config // <<_EOC_; - lua_package_path "$apisix_home/?.lua;$apisix_home/?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; + lua_package_path "$apisix_home/?.lua;$apisix_home/?/init.lua;$apisix_home/deps/share/lua/5.1/?/init.lua;$apisix_home/deps/share/lua/5.1/?.lua;$apisix_home/apisix/?.lua;$apisix_home/t/?.lua;;"; lua_package_cpath "$apisix_home/?.so;$apisix_home/deps/lib/lua/5.1/?.so;$apisix_home/deps/lib64/lua/5.1/?.so;;"; lua_socket_log_errors off;