made run() generate an environment for stuff it runs
This commit is contained in:
parent
1834eadb29
commit
22839cd27c
@ -29,7 +29,7 @@ function loadfile(fn)
|
||||
local f=io.open(fn,"rb")
|
||||
local S=f:read("*a")
|
||||
f:close()
|
||||
return load(S)
|
||||
return load(S,"=("..fn..")","bt",os.genenv())
|
||||
end
|
||||
function run(fn,...)
|
||||
local r = {pcall(loadfile(fn),...)}
|
||||
|
Loading…
Reference in New Issue
Block a user