nwm opacity / improvements - env cleanup

This commit is contained in:
kepler155c@gmail.com
2020-05-05 17:26:44 -06:00
parent 87a3f9fa96
commit 8db9a89f68
4 changed files with 75 additions and 99 deletions

View File

@@ -27,9 +27,6 @@ local function unregisterApp(key)
end
end
local sandboxEnv = Util.shallowCopy(_ENV)
setmetatable(sandboxEnv, { __index = _G })
multishell.setTitle(multishell.getCurrent(), 'App Store')
UI:configure('Appstore', ...)
@@ -60,7 +57,7 @@ local function downloadApp(app)
end
local function runApp(app, checkExists, ...)
local env = shell.makeEnv()
local path, fn
local args = { ... }
@@ -81,14 +78,14 @@ local function runApp(app, checkExists, ...)
error('Failed to download')
end
_G.setfenv(fn, sandboxEnv)
_G.setfenv(fn, env)
fn(table.unpack(args))
end
end
multishell.openTab({
title = app.name,
env = sandboxEnv,
env = env,
path = path,
fn = fn,
focused = true,