From 1f8140c95ced6b7ce291e16c26c80800fa4f1f9d Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Wed, 5 Jun 2024 01:18:21 -0300 Subject: Update README, misc cleanups --- src/host/genpath.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/host') 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 -- cgit 1.4.1