diff options
-rw-r--r-- | src/luarocks/core/cfg.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index cfbbd144..2606291c 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -66,15 +66,15 @@ end | |||
66 | 66 | ||
67 | local function set_confdirs(cfg, platforms, hardcoded_sysconfdir) | 67 | local function set_confdirs(cfg, platforms, hardcoded_sysconfdir) |
68 | local sysconfdir = os.getenv("LUAROCKS_SYSCONFDIR") or hardcoded_sysconfdir | 68 | local sysconfdir = os.getenv("LUAROCKS_SYSCONFDIR") or hardcoded_sysconfdir |
69 | if not sysconfdir then | ||
70 | sysconfdir = detect_sysconfdir(cfg.lua_version) | ||
71 | end | ||
72 | if platforms.windows then | 69 | if platforms.windows then |
73 | cfg.home = os.getenv("APPDATA") or "c:" | 70 | cfg.home = os.getenv("APPDATA") or "c:" |
74 | cfg.home_tree = cfg.home.."/luarocks" | 71 | cfg.home_tree = cfg.home.."/luarocks" |
75 | cfg.homeconfdir = cfg.home_tree | 72 | cfg.homeconfdir = cfg.home_tree |
76 | cfg.sysconfdir = sysconfdir or ((os.getenv("PROGRAMFILES") or "c:") .. "/luarocks") | 73 | cfg.sysconfdir = sysconfdir or ((os.getenv("PROGRAMFILES") or "c:") .. "/luarocks") |
77 | else | 74 | else |
75 | if not sysconfdir then | ||
76 | sysconfdir = detect_sysconfdir(cfg.lua_version) | ||
77 | end | ||
78 | cfg.home = os.getenv("HOME") or "" | 78 | cfg.home = os.getenv("HOME") or "" |
79 | cfg.home_tree = (os.getenv("USER") ~= "root") and cfg.home.."/.luarocks" | 79 | cfg.home_tree = (os.getenv("USER") ~= "root") and cfg.home.."/.luarocks" |
80 | cfg.homeconfdir = cfg.home.."/.luarocks" | 80 | cfg.homeconfdir = cfg.home.."/.luarocks" |