From 22839cd27cbd380b57cf34ee86dae064b0a05e0d Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 27 Aug 2017 03:52:54 +1000 Subject: [PATCH] made run() generate an environment for stuff it runs --- modules/lib/shutil.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lib/shutil.lua b/modules/lib/shutil.lua index e12374f..85a4828 100644 --- a/modules/lib/shutil.lua +++ b/modules/lib/shutil.lua @@ -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),...)}