diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/deps.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index a2b7f0ea..6eb19aba 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
@@ -202,6 +202,7 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify) | |||
202 | assert(type(verify) == "boolean" or verify == nil) | 202 | assert(type(verify) == "boolean" or verify == nil) |
203 | 203 | ||
204 | if rockspec.supported_platforms and next(rockspec.supported_platforms) then | 204 | if rockspec.supported_platforms and next(rockspec.supported_platforms) then |
205 | local all_negative = true | ||
205 | local supported = false | 206 | local supported = false |
206 | for _, plat in pairs(rockspec.supported_platforms) do | 207 | for _, plat in pairs(rockspec.supported_platforms) do |
207 | local neg | 208 | local neg |
@@ -211,13 +212,14 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify) | |||
211 | return nil, "This rockspec for "..rockspec.package.." does not support "..plat.." platforms." | 212 | return nil, "This rockspec for "..rockspec.package.." does not support "..plat.." platforms." |
212 | end | 213 | end |
213 | else | 214 | else |
215 | all_negative = false | ||
214 | if cfg.is_platform(plat) then | 216 | if cfg.is_platform(plat) then |
215 | supported = true | 217 | supported = true |
216 | break | 218 | break |
217 | end | 219 | end |
218 | end | 220 | end |
219 | end | 221 | end |
220 | if supported == false then | 222 | if supported == false and not all_negative then |
221 | local plats = cfg.print_platforms() | 223 | local plats = cfg.print_platforms() |
222 | return nil, "This rockspec for "..rockspec.package.." does not support "..plats.." platforms." | 224 | return nil, "This rockspec for "..rockspec.package.." does not support "..plats.." platforms." |
223 | end | 225 | end |