diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/search.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/luarocks/search.lua b/src/luarocks/search.lua index 99a969c1..d2bad630 100644 --- a/src/luarocks/search.lua +++ b/src/luarocks/search.lua | |||
| @@ -143,18 +143,18 @@ function search.search_repos(query, lua_version) | |||
| 143 | 143 | ||
| 144 | local result_tree = {} | 144 | local result_tree = {} |
| 145 | for _, repo in ipairs(cfg.rocks_servers) do | 145 | for _, repo in ipairs(cfg.rocks_servers) do |
| 146 | if not cfg.disabled_servers[repo] then | 146 | if type(repo) == "string" then |
| 147 | if type(repo) == "string" then | 147 | repo = { repo } |
| 148 | repo = { repo } | 148 | end |
| 149 | end | 149 | for _, mirror in ipairs(repo) do |
| 150 | for _, mirror in ipairs(repo) do | 150 | if not cfg.disabled_servers[mirror] then |
| 151 | local protocol, pathname = dir.split_url(mirror) | 151 | local protocol, pathname = dir.split_url(mirror) |
| 152 | if protocol == "file" then | 152 | if protocol == "file" then |
| 153 | mirror = pathname | 153 | mirror = pathname |
| 154 | end | 154 | end |
| 155 | local ok, err, errcode = remote_manifest_search(result_tree, mirror, query, lua_version) | 155 | local ok, err, errcode = remote_manifest_search(result_tree, mirror, query, lua_version) |
| 156 | if errcode == "network" then | 156 | if errcode == "network" then |
| 157 | cfg.disabled_servers[repo] = true | 157 | cfg.disabled_servers[mirror] = true |
| 158 | end | 158 | end |
| 159 | if ok then | 159 | if ok then |
| 160 | break | 160 | break |
