one last round of nil checks

This commit is contained in:
jane 2021-06-06 00:53:11 -04:00
parent 0de38f49a8
commit a7f0295fed
2 changed files with 9 additions and 3 deletions

View File

@ -135,8 +135,10 @@ end
if shouldInstall then
local files = getAllFiles(programToInstall)
for _, value in ipairs(files) do
if value ~= nil then
downloadFile(programToInstall, value)
end
end
finishInstall(programToInstall, files)
elseif fs.exists(path .. "updater/update.lua") then
shell.run(path .. "updater/update.lua " .. programToInstall)

View File

@ -147,8 +147,10 @@ if programToInstall == nil then
local files = getAllFiles(value)
if files ~= nil then
for _, value2 in ipairs(files) do
if value2 ~= nil then
downloadFile(value, value2)
end
end
finishInstall(files)
end
end
@ -161,8 +163,10 @@ else
print("no updates found.")
else
for _, value in ipairs(files) do
if value ~= nil then
downloadFile(programToInstall, value)
end
end
finishInstall(programToInstall, files)
end
end