diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/type_check.lua | 6 | ||||
| -rw-r--r-- | src/luarocks/type_check.tl | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua index d4fec1bf..a99ec691 100644 --- a/src/luarocks/type_check.lua +++ b/src/luarocks/type_check.lua | |||
| @@ -31,8 +31,10 @@ type_check.MAGIC_PLATFORMS = {} | |||
| 31 | do | 31 | do |
| 32 | local function fill_in_version(tbl, version) | 32 | local function fill_in_version(tbl, version) |
| 33 | for _, v in pairs(tbl.fields) do | 33 | for _, v in pairs(tbl.fields) do |
| 34 | if v._version == nil then | 34 | if type(v) == "table" then |
| 35 | v._version = version | 35 | if v._version == nil then |
| 36 | v._version = version | ||
| 37 | end | ||
| 36 | fill_in_version(v) | 38 | fill_in_version(v) |
| 37 | end | 39 | end |
| 38 | end | 40 | end |
diff --git a/src/luarocks/type_check.tl b/src/luarocks/type_check.tl index 0f3bde2d..a51fa932 100644 --- a/src/luarocks/type_check.tl +++ b/src/luarocks/type_check.tl | |||
| @@ -31,9 +31,11 @@ type_check.MAGIC_PLATFORMS = {} | |||
| 31 | do | 31 | do |
| 32 | local function fill_in_version(tbl: TableSchema, version?: string) | 32 | local function fill_in_version(tbl: TableSchema, version?: string) |
| 33 | for _, v in pairs(tbl.fields) do | 33 | for _, v in pairs(tbl.fields) do |
| 34 | if v._version == nil then | 34 | if v is TableSchema then |
| 35 | v._version = version | 35 | if v._version == nil then |
| 36 | fill_in_version(v) | 36 | v._version = version |
| 37 | end | ||
| 38 | fill_in_version(v) | ||
| 37 | end | 39 | end |
| 38 | end | 40 | end |
| 39 | end | 41 | end |
