Browse files

Make sure configuration files are reported correctly in help screen.

  • Loading branch information...
1 parent e636fcd commit bc8b48825c1f9b06cd31800281b489fdb59435e8 @hishamhm hishamhm committed Apr 24, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/luarocks/cfg.lua
View
6 src/luarocks/cfg.lua
@@ -98,20 +98,20 @@ local sys_config_file, home_config_file
local sys_config_ok, home_config_ok = false, false
if detected.windows or detected.mingw32 then
home = os.getenv("APPDATA") or "c:"
- sys_config_file = "c:/luarocks/config.lua"
+ sys_config_file = site_config.LUAROCKS_SYSCONFIG or "c:/luarocks/config.lua"
home_config_file = home.."/luarocks/config.lua"
home_tree = home.."/luarocks/"
else
home = os.getenv("HOME") or ""
- sys_config_file = "/etc/luarocks/config.lua"
+ sys_config_file = site_config.LUAROCKS_SYSCONFIG or "/etc/luarocks/config.lua"
home_config_file = home.."/.luarocks/config.lua"
home_tree = home.."/.luarocks/"
end
variables = {}
rocks_trees = {}
-local ok, err = persist.load_into_table(site_config.LUAROCKS_SYSCONFIG or sys_config_file, _M)
+local ok, err = persist.load_into_table(sys_config_file, _M)
if ok then
sys_config_ok = true
else -- nil or false

0 comments on commit bc8b488

Please sign in to comment.