diff options
| -rw-r--r-- | src/luarocks/rockspecs.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/luarocks/rockspecs.lua b/src/luarocks/rockspecs.lua index e9fb73be..fe4a6d74 100644 --- a/src/luarocks/rockspecs.lua +++ b/src/luarocks/rockspecs.lua | |||
| @@ -21,9 +21,9 @@ end | |||
| 21 | -- subset of its "platforms" field. The "platforms" field should | 21 | -- subset of its "platforms" field. The "platforms" field should |
| 22 | -- be a table containing subtables keyed with strings representing | 22 | -- be a table containing subtables keyed with strings representing |
| 23 | -- platform names. Names that match the contents of the global | 23 | -- platform names. Names that match the contents of the global |
| 24 | -- cfg.platforms setting are used. For example, if | 24 | -- detected platforms setting are used. For example, if |
| 25 | -- cfg.platforms= {"foo"}, then the fields of | 25 | -- platform "unix" is detected, then the fields of |
| 26 | -- tbl.platforms.foo will overwrite those of tbl with the same | 26 | -- tbl.platforms.unix will overwrite those of tbl with the same |
| 27 | -- names. For table values, the operation is performed recursively | 27 | -- names. For table values, the operation is performed recursively |
| 28 | -- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of | 28 | -- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of |
| 29 | -- tbl.x are preserved). | 29 | -- tbl.x are preserved). |
| @@ -35,7 +35,7 @@ local function platform_overrides(tbl) | |||
| 35 | if not tbl then return end | 35 | if not tbl then return end |
| 36 | 36 | ||
| 37 | if tbl.platforms then | 37 | if tbl.platforms then |
| 38 | for _, platform in ipairs(cfg.platforms) do | 38 | for platform in cfg.each_platform() do |
| 39 | local platform_tbl = tbl.platforms[platform] | 39 | local platform_tbl = tbl.platforms[platform] |
| 40 | if platform_tbl then | 40 | if platform_tbl then |
| 41 | util.deep_merge(tbl, platform_tbl) | 41 | util.deep_merge(tbl, platform_tbl) |
