1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-17 16:57:39 +00:00

better startup

This commit is contained in:
kepler155c@gmail.com
2017-09-26 15:18:44 -04:00
parent f2e1a39584
commit 13efde276d
5 changed files with 22 additions and 2131 deletions

View File

@@ -61,14 +61,12 @@ function shell.run(...)
local result, err
local env = Util.shallowCopy(sandboxEnv)
if isUrl then
local env = Util.shallowCopy(sandboxEnv)
setmetatable(env, { __index = _G })
result, err = Util.runUrl(env, path, unpack(args))
else
result, err = os.run(Util.shallowCopy(sandboxEnv), path, unpack(args))
result, err = Util.run(env, path, unpack(args))
end
if multishell and multishell.getTitle then
local title = 'shell'
if #tProgramStack > 0 then
@@ -237,7 +235,7 @@ if #tArgs > 0 then
-- Run the program specified in this new shell
local s, m = shell.run( ... )
if not s and m and m ~= 'Terminated' then
error(m or '')
error(m)
end
return s, m
end