aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-04-24 16:48:29 -0300
committerHisham Muhammad <hisham@gobolinux.org>2012-04-24 16:50:54 -0300
commitbc8b48825c1f9b06cd31800281b489fdb59435e8 (patch)
tree21078b4cb9dfc7ca607ed706b7748d4d9e76a01d /src
parente636fcd2a9ae365e067023e50cc621e7a68da7b5 (diff)
downloadluarocks-bc8b48825c1f9b06cd31800281b489fdb59435e8.tar.gz
luarocks-bc8b48825c1f9b06cd31800281b489fdb59435e8.tar.bz2
luarocks-bc8b48825c1f9b06cd31800281b489fdb59435e8.zip
Make sure configuration files are reported correctly in help screen.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cfg.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 1147d725..6b0d14a9 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -98,12 +98,12 @@ local sys_config_file, home_config_file
98local sys_config_ok, home_config_ok = false, false 98local sys_config_ok, home_config_ok = false, false
99if detected.windows or detected.mingw32 then 99if detected.windows or detected.mingw32 then
100 home = os.getenv("APPDATA") or "c:" 100 home = os.getenv("APPDATA") or "c:"
101 sys_config_file = "c:/luarocks/config.lua" 101 sys_config_file = site_config.LUAROCKS_SYSCONFIG or "c:/luarocks/config.lua"
102 home_config_file = home.."/luarocks/config.lua" 102 home_config_file = home.."/luarocks/config.lua"
103 home_tree = home.."/luarocks/" 103 home_tree = home.."/luarocks/"
104else 104else
105 home = os.getenv("HOME") or "" 105 home = os.getenv("HOME") or ""
106 sys_config_file = "/etc/luarocks/config.lua" 106 sys_config_file = site_config.LUAROCKS_SYSCONFIG or "/etc/luarocks/config.lua"
107 home_config_file = home.."/.luarocks/config.lua" 107 home_config_file = home.."/.luarocks/config.lua"
108 home_tree = home.."/.luarocks/" 108 home_tree = home.."/.luarocks/"
109end 109end
@@ -111,7 +111,7 @@ end
111variables = {} 111variables = {}
112rocks_trees = {} 112rocks_trees = {}
113 113
114local ok, err = persist.load_into_table(site_config.LUAROCKS_SYSCONFIG or sys_config_file, _M) 114local ok, err = persist.load_into_table(sys_config_file, _M)
115if ok then 115if ok then
116 sys_config_ok = true 116 sys_config_ok = true
117else -- nil or false 117else -- nil or false