diff options
author | Tomás Guisasola <tomasguisasola@gmail.com> | 2019-01-08 11:33:24 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-01-08 11:35:21 -0200 |
commit | 27c0625035cef8abd09440c816fb0aafd7b37854 (patch) | |
tree | a4a0011f8be123cd81a7eb7516d30278fa240047 | |
parent | 9bb5c285f007d4d2f83ff5593db5afa7fa2a0310 (diff) | |
download | luarocks-27c0625035cef8abd09440c816fb0aafd7b37854.tar.gz luarocks-27c0625035cef8abd09440c816fb0aafd7b37854.tar.bz2 luarocks-27c0625035cef8abd09440c816fb0aafd7b37854.zip |
core.cfg: fix sysconfdir detection trimming @ from debug.getinfo
Signed-off-by: Hisham Muhammad <hisham@gobolinux.org>
-rw-r--r-- | src/luarocks/core/cfg.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index bbcc72ac..f93e67a7 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -49,6 +49,9 @@ local platform_order = { | |||
49 | 49 | ||
50 | local function detect_sysconfdir(lua_version) | 50 | local function detect_sysconfdir(lua_version) |
51 | local src = debug.getinfo(1, "S").source:gsub("\\", "/"):gsub("/+", "/") | 51 | local src = debug.getinfo(1, "S").source:gsub("\\", "/"):gsub("/+", "/") |
52 | if src:sub(1, 1) == "@" then | ||
53 | src = src:sub(2) | ||
54 | end | ||
52 | local basedir = src:match("^(.*)/luarocks/core/cfg.lua$") | 55 | local basedir = src:match("^(.*)/luarocks/core/cfg.lua$") |
53 | if not basedir then | 56 | if not basedir then |
54 | return | 57 | return |