diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-04-24 16:48:29 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-04-24 16:50:54 -0300 |
commit | bc8b48825c1f9b06cd31800281b489fdb59435e8 (patch) | |
tree | 21078b4cb9dfc7ca607ed706b7748d4d9e76a01d /src | |
parent | e636fcd2a9ae365e067023e50cc621e7a68da7b5 (diff) | |
download | luarocks-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.lua | 6 |
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 | |||
98 | local sys_config_ok, home_config_ok = false, false | 98 | local sys_config_ok, home_config_ok = false, false |
99 | if detected.windows or detected.mingw32 then | 99 | if 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/" |
104 | else | 104 | else |
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/" |
109 | end | 109 | end |
@@ -111,7 +111,7 @@ end | |||
111 | variables = {} | 111 | variables = {} |
112 | rocks_trees = {} | 112 | rocks_trees = {} |
113 | 113 | ||
114 | local ok, err = persist.load_into_table(site_config.LUAROCKS_SYSCONFIG or sys_config_file, _M) | 114 | local ok, err = persist.load_into_table(sys_config_file, _M) |
115 | if ok then | 115 | if ok then |
116 | sys_config_ok = true | 116 | sys_config_ok = true |
117 | else -- nil or false | 117 | else -- nil or false |