diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-06-05 01:18:21 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-06-05 01:18:21 -0300 |
commit | 1f8140c95ced6b7ce291e16c26c80800fa4f1f9d (patch) | |
tree | b5d5008a3c9fc6b97953f254ef9cbe7b06aa912c /src/host/genpath.lua | |
parent | dba1285ca98d7a325f05b77b805089b3edd61867 (diff) |
Update README, misc cleanups
Diffstat (limited to 'src/host/genpath.lua')
-rw-r--r-- | src/host/genpath.lua | 10 |
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 |