luvit/luvi — pull request #21 by creationix (2014-10-20 23:09:27+00:00)
Title: New behavior

Since luvi is used to build things like luvit that want full control over args, we can't use args to tell luvi where to find the path.

The proposed resolution is as follows:
- If LUVI_ZIP environment variable is set, it's the path to an external zip file.
- If LUVI_DIR environment variable is set, it's the path to the folder containing main.lua.
- If a zip is appended to the binary itself, use that.
- Otherwise, search in the cwd for main.lua.
- Look in parent directories also for main.lua
- If none are found, throw an error reporting usage.