:3
This commit is contained in:
parent
dfa9e305ab
commit
4df6073f9c
|
@ -12,7 +12,7 @@
|
|||
--- @field debug fun(...)
|
||||
|
||||
--- @class Updater
|
||||
--- @field addEntry fun(path: string, branch: string, url: string)
|
||||
--- @field addEntry fun(self: Updater, path: string, branch: string, url: string)
|
||||
|
||||
--- @class JsonParser
|
||||
--- @field decode fun(s: string): table
|
||||
|
|
4
rtmc.lua
4
rtmc.lua
|
@ -370,10 +370,8 @@ rawset(__BUNDLER_FILES, "updater", function ()
|
|||
branch = branch,
|
||||
url = url
|
||||
};
|
||||
if not fs.exists(path) then
|
||||
self:update(path, url);
|
||||
end
|
||||
end
|
||||
function updater:checkAndUpdateAll()
|
||||
local updated = false;
|
||||
for path, entry in pairs(self.updated_files) do
|
||||
|
@ -402,7 +400,7 @@ rawset(__BUNDLER_FILES, "updater", function ()
|
|||
return false;
|
||||
end
|
||||
local body, berr = req.readAll();
|
||||
if not req then
|
||||
if not body then
|
||||
log.error("Updater:check: Could not get body of request: " .. berr);
|
||||
return false;
|
||||
end
|
||||
|
|
|
@ -32,10 +32,8 @@ function updater:addEntry(path, branch, url)
|
|||
branch = branch,
|
||||
url = url
|
||||
};
|
||||
if not fs.exists(path) then
|
||||
self:update(path, url);
|
||||
end
|
||||
end
|
||||
|
||||
function updater:checkAndUpdateAll()
|
||||
local updated = false;
|
||||
|
@ -68,7 +66,7 @@ function updater:check(branch)
|
|||
end
|
||||
|
||||
local body, berr = req.readAll();
|
||||
if not req then
|
||||
if not body then
|
||||
log.error("Updater:check: Could not get body of request: " .. berr);
|
||||
return false;
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user