diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/repos.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/luarocks/repos.lua b/src/luarocks/repos.lua index 6827cd0f..af1daf9e 100644 --- a/src/luarocks/repos.lua +++ b/src/luarocks/repos.lua | |||
| @@ -248,6 +248,14 @@ end | |||
| 248 | local function check_spot_if_available(name, version, deploy_type, file_path) | 248 | local function check_spot_if_available(name, version, deploy_type, file_path) |
| 249 | local item_type, item_name = get_provided_item(deploy_type, file_path) | 249 | local item_type, item_name = get_provided_item(deploy_type, file_path) |
| 250 | local cur_name, cur_version = manif.get_current_provider(item_type, item_name) | 250 | local cur_name, cur_version = manif.get_current_provider(item_type, item_name) |
| 251 | |||
| 252 | -- older versions of LuaRocks (< 3) registered "foo.init" files as "foo" | ||
| 253 | -- (which caused problems, so that behavior was changed). But look for that | ||
| 254 | -- in the manifest anyway for backward compatibility. | ||
| 255 | if not cur_name and deploy_type == "lua" and item_name:match("%.init$") then | ||
| 256 | cur_name, cur_version = manif.get_current_provider(item_type, (item_name:gsub("%.init$", ""))) | ||
| 257 | end | ||
| 258 | |||
| 251 | if (not cur_name) | 259 | if (not cur_name) |
| 252 | or (name < cur_name) | 260 | or (name < cur_name) |
| 253 | or (name == cur_name and (version == cur_version | 261 | or (name == cur_name and (version == cur_version |
