mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
set global SERVICE_PATH for compatibility
This commit is contained in:
@@ -27,8 +27,14 @@ package.path , LUA_PATH = LUA_PATH
|
||||
package.cpath , LUA_CPATH = LUA_CPATH
|
||||
|
||||
local service_path = string.match(pattern, "(.*/)[^/?]+$")
|
||||
|
||||
if service_path then
|
||||
package.path = service_path .. ";" .. package.path
|
||||
service_path = string.gsub(service_path, "?", args[1])
|
||||
package.path = service_path .. "?.lua;" .. package.path
|
||||
SERVICE_PATH = service_path
|
||||
else
|
||||
local p = string.match(pattern, "(.*/).+$")
|
||||
SERVICE_PATH = p
|
||||
end
|
||||
|
||||
if LUA_PRELOAD then
|
||||
|
||||
Reference in New Issue
Block a user