diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-04 15:26:27 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:51:31 +0300 |
commit | d64736056fa450d3b1b05dad8ea3da4be41976bf (patch) | |
tree | d99b96feac4248157b167faaa7a45fb711c6ebb9 | |
parent | 921caa9703312510b4a51007c14d573b9062de97 (diff) | |
download | luarocks-d64736056fa450d3b1b05dad8ea3da4be41976bf.tar.gz luarocks-d64736056fa450d3b1b05dad8ea3da4be41976bf.tar.bz2 luarocks-d64736056fa450d3b1b05dad8ea3da4be41976bf.zip |
type_check
-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 |