summary refs log tree commit diff stats
path: root/src/cratera.cratera.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/cratera.cratera.d')
-rw-r--r--src/cratera.cratera.d/lib.cratera9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cratera.cratera.d/lib.cratera b/src/cratera.cratera.d/lib.cratera
index 701de31..6e1627e 100644
--- a/src/cratera.cratera.d/lib.cratera
+++ b/src/cratera.cratera.d/lib.cratera
@@ -19,7 +19,7 @@
 local cratera_env = _G
 local cratera_loader_base = cratera_env.load
 
--- only use setfenv if load doesn't support env argument
+-- only use setfenv if lua load doesn't support env argument
 local setfenv = (lua.loadstring or lua.load)("return setfenv", nil, nil, {})()
 
 function cratera_env.load(chunk, chunkname, mode, env)
@@ -38,3 +38,10 @@ function cratera_env.load(chunk, chunkname, mode, env)
     end
 end
 
+-- cratera opts not to support dostring/dofile.
+if lua.dostring then
+    cratera_env.dostring = false
+end
+if lua.dofile then
+    cratera_env.dofile = false
+end