Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Nov 29, 2024
1 parent 52b603a commit b81f943
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions xmake/research.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,21 @@ target("research_packager") do
local maxRetries= 5
local retries = 0
while retries <= maxRetries do
result = os.execv(hdiutil_command)
if result then
return true, "Command executed successfully"
else
retries = retries + 1
if retries > maxRetries then
return false, "Command failed after " .. maxRetries .. " retries"
else
io.write("Retrying, attempt ")
print(retries)
end
end
try {
function ()
os.execv(hdiutil_command)
end,
catch {
function (errors)
retries = retries + 1
io.write("Retrying, attempt ")
print(retries)
if retries > maxRetries then
os.raise("Command failed after " .. maxRetries .. " retries")
end
end
}
}
end
end)
end

0 comments on commit b81f943

Please sign in to comment.