Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ahai-code committed Apr 14, 2024
1 parent 58134ae commit 0e9b58f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lib/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,13 @@ function util:getInfo()
end

local respInfo = json.decode(resp.body)[RUNTIME.osType]

for _, info in pairs(respInfo) do
for _, obj in ipairs(info) do
if obj.arch=="" then
table.insert(result, {version = obj.version,note=""})
table.insert(utilSingleton.RELEASES,{version = obj.version,url=obj.download_url,sha256=obj.sha256})
elseif obj.arch == RUNTIME.archType then
table.insert(result, {version = obj.version,note=""})
table.insert(utilSingleton.RELEASES,{version = obj.version,url=obj.download_url,sha256=obj.sha256})
end
for _, obj in ipairs(respInfo) do
if obj.arch=="" then
table.insert(result, {version = obj.version,note=""})
table.insert(utilSingleton.RELEASES,{version = obj.version,url=obj.download_url,sha256=obj.sha256})
elseif obj.arch == RUNTIME.archType then
table.insert(result, {version = obj.version,note=""})
table.insert(utilSingleton.RELEASES,{version = obj.version,url=obj.download_url,sha256=obj.sha256})
end
end
table.sort(result, function(a, b)
Expand Down

0 comments on commit 0e9b58f

Please sign in to comment.