diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2025-03-05 01:26:47 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2025-03-10 10:51:05 -0300 |
commit | 30a2dba8b9748bac34e0fd578b107ab955369125 (patch) | |
tree | f30a8b668a0322d732274549c1a985582e2f0cb7 | |
parent | 4052a7fd513517730455ed63539b04cce54fa90c (diff) | |
download | luarocks-30a2dba8b9748bac34e0fd578b107ab955369125.tar.gz luarocks-30a2dba8b9748bac34e0fd578b107ab955369125.tar.bz2 luarocks-30a2dba8b9748bac34e0fd578b107ab955369125.zip |
add debug mode where we load .tl files directly
-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" |