summary refs log tree commit diff stats
path: root/src/host/genpath.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/genpath.lua')
-rw-r--r--src/host/genpath.lua10
1 files changed, 7 insertions, 3 deletions
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