aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2025-03-05 01:26:47 -0300
committerHisham Muhammad <hisham@gobolinux.org>2025-03-10 10:51:05 -0300
commit30a2dba8b9748bac34e0fd578b107ab955369125 (patch)
treef30a8b668a0322d732274549c1a985582e2f0cb7
parent4052a7fd513517730455ed63539b04cce54fa90c (diff)
downloadluarocks-30a2dba8b9748bac34e0fd578b107ab955369125.tar.gz
luarocks-30a2dba8b9748bac34e0fd578b107ab955369125.tar.bz2
luarocks-30a2dba8b9748bac34e0fd578b107ab955369125.zip
add debug mode where we load .tl files directly
-rwxr-xr-xsrc/bin/luarocks10
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
3if 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)
9end
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
4local cfg = require("luarocks.core.cfg") 13local cfg = require("luarocks.core.cfg")
5 14
6local loader = require("luarocks.loader")
7local cmd = require("luarocks.cmd") 15local cmd = require("luarocks.cmd")
8 16
9local description = "LuaRocks main command-line interface" 17local description = "LuaRocks main command-line interface"