1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-19 14:48:07 +00:00

transition tot kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-11 20:53:32 -05:00
parent d224f5df25
commit fc8d44b60d
19 changed files with 425 additions and 366 deletions

View File

@@ -412,9 +412,9 @@ function Util.httpGet(url, headers)
end
function Util.download(url, filename)
local contents = Util.httpGet(url)
local contents, msg = Util.httpGet(url)
if not contents then
error('Failed to download ' .. url)
error(string.format('Failed to download %s\n%s', url, msg))
end
if filename then
@@ -441,6 +441,7 @@ function Util.runUrl(env, url, ...) -- os.run equivalent
end
function Util.run(env, path, ...)
if type(env) ~= 'table' then error('Util.run: env must be a table', 2) end
setmetatable(env, { __index = _G })
local fn, m = loadfile(path, env)
if fn then