summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2024-06-05 01:18:21 -0300
committerSoniEx2 <endermoneymod@gmail.com>2024-06-05 01:18:21 -0300
commit1f8140c95ced6b7ce291e16c26c80800fa4f1f9d (patch)
treeb5d5008a3c9fc6b97953f254ef9cbe7b06aa912c /src
parentdba1285ca98d7a325f05b77b805089b3edd61867 (diff)
Update README, misc cleanups
Diffstat (limited to 'src')
-rw-r--r--src/cratera.cratera.d/lib.cratera8
-rw-r--r--src/host/genpath.lua10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/cratera.cratera.d/lib.cratera b/src/cratera.cratera.d/lib.cratera
index 6e1627e..69ca476 100644
--- a/src/cratera.cratera.d/lib.cratera
+++ b/src/cratera.cratera.d/lib.cratera
@@ -39,9 +39,5 @@ function cratera_env.load(chunk, chunkname, mode, env)
 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
+cratera_env.dostring = false
+cratera_env.dofile = false
diff --git a/src/host/genpath.lua b/src/host/genpath.lua
index e12e9a8..c11caab 100644
--- a/src/host/genpath.lua
+++ b/src/host/genpath.lua
@@ -2,8 +2,8 @@
 -- package.path, but every .lua is replaced with .cratera
 -- or use an explicit CRATERA_PATH
 
-if os.getenv("DEFAULT_CRATERA_PATH") then
-    print(string.format("return %q", os.getenv("DEFAULT_CRATERA_PATH")))
+if os.getenv("CRATERA_DEFAULT_PATH") then
+    print(string.format("return %q", os.getenv("CRATERA_DEFAULT_PATH")))
     return
 end
 
@@ -22,4 +22,8 @@ for path_part in possible_cratera_path:gmatch(pathfinder) do
     end
 end
 
-print(string.format("return %q", table.concat(path_parts, pathsep)))
+if arg[1] == "display" then
+    print(table.concat(path_parts, pathsep))
+else
+    print(string.format("return %q", table.concat(path_parts, pathsep)))
+end