diff options
-rw-r--r-- | src/luarocks/core/cfg.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index 90e52150..6d8fe55b 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -54,7 +54,11 @@ local function detect_sysconfdir() | |||
54 | if not debug then | 54 | if not debug then |
55 | return | 55 | return |
56 | end | 56 | end |
57 | local src = dir.normalize(debug.getinfo(1, "S")) | 57 | local src = debug.getinfo(1, "S").source |
58 | if not src then | ||
59 | return | ||
60 | end | ||
61 | src = dir.normalize(src) | ||
58 | if src:sub(1, 1) == "@" then | 62 | if src:sub(1, 1) == "@" then |
59 | src = src:sub(2) | 63 | src = src:sub(2) |
60 | end | 64 | end |