mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
snaxd change add package.path
This commit is contained in:
@@ -61,6 +61,8 @@ return function (name , G, loader)
|
||||
|
||||
setmetatable(G, { __index = env , __newindex = init_system })
|
||||
|
||||
local pattern
|
||||
|
||||
do
|
||||
local path = skynet.getenv "snax"
|
||||
|
||||
@@ -70,6 +72,7 @@ return function (name , G, loader)
|
||||
local filename = string.gsub(pat, "?", name)
|
||||
local f , err = loader(filename, "bt", G)
|
||||
if f then
|
||||
pattern = pat
|
||||
mainfunc = f
|
||||
break
|
||||
else
|
||||
@@ -90,5 +93,5 @@ return function (name , G, loader)
|
||||
G[k] = v
|
||||
end
|
||||
|
||||
return func
|
||||
return func, pattern
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user