mirror of
https://github.com/kepler155c/opus
synced 2025-01-19 03:42:51 +00:00
package manager wip
This commit is contained in:
parent
9ef4d9ef64
commit
340e37da82
@ -81,7 +81,7 @@ local function install(name, isUpdate, ignoreDeps)
|
|||||||
if not isUpdate then
|
if not isUpdate then
|
||||||
if manifest.install then
|
if manifest.install then
|
||||||
local s, m = pcall(function()
|
local s, m = pcall(function()
|
||||||
load(manifest.install, 'install', nil, makeSandbox())
|
load(manifest.install, 'install', nil, makeSandbox())()
|
||||||
end)
|
end)
|
||||||
if not s and m then
|
if not s and m then
|
||||||
_G.printError(m)
|
_G.printError(m)
|
||||||
@ -141,7 +141,7 @@ if action == 'uninstall' then
|
|||||||
local manifest = Packages:getManifest(name)
|
local manifest = Packages:getManifest(name)
|
||||||
if manifest.uninstall then
|
if manifest.uninstall then
|
||||||
local s, m = pcall(function()
|
local s, m = pcall(function()
|
||||||
load(manifest.uninstall, 'uninstall', nil, makeSandbox())
|
load(manifest.uninstall, 'uninstall', nil, makeSandbox())()
|
||||||
end)
|
end)
|
||||||
if not s and m then
|
if not s and m then
|
||||||
_G.printError(m)
|
_G.printError(m)
|
||||||
|
Loading…
Reference in New Issue
Block a user