diff options
-rwxr-xr-x | src/bin/luarocks | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/luarocks b/src/bin/luarocks index 56caaa60..8a74d033 100755 --- a/src/bin/luarocks +++ b/src/bin/luarocks | |||
@@ -1,9 +1,17 @@ | |||
1 | #!/usr/bin/env lua | 1 | #!/usr/bin/env lua |
2 | 2 | ||
3 | if os.getenv("LUAROCKS_DEBUG") then | ||
4 | local tl = require("tl") | ||
5 | tl.path = "./src/?.tl" | ||
6 | tl.loader() | ||
7 | local tl_loader = table.remove(package.searchers, 2) | ||
8 | table.insert(package.searchers, 1, tl_loader) | ||
9 | end | ||
10 | |||
3 | -- Load cfg first so that the loader knows it is running inside LuaRocks | 11 | -- Load cfg first so that the loader knows it is running inside LuaRocks |
12 | |||
4 | local cfg = require("luarocks.core.cfg") | 13 | local cfg = require("luarocks.core.cfg") |
5 | 14 | ||
6 | local loader = require("luarocks.loader") | ||
7 | local cmd = require("luarocks.cmd") | 15 | local cmd = require("luarocks.cmd") |
8 | 16 | ||
9 | local description = "LuaRocks main command-line interface" | 17 | local description = "LuaRocks main command-line interface" |