diff options
| author | ruki <[email protected]> | 2026-08-09 23:45:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-09 23:45:48 +0800 |
| commit | 6f2617cbdf2ba77ba424507941a50fda8d64e0b9 (patch) | |
| tree | e14c0b857629e8b59d187b5c8e185aea4ecef8e8 /xmake/modules | |
| parent | c7172a3a0cce98e395567202e732ebb86b475360 (diff) | |
improve addon.register
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/install.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/private/xrepo/action/remove.lua | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua index 629b37aff..fe74e833e 100644 --- a/xmake/modules/private/action/require/impl/actions/install.lua +++ b/xmake/modules/private/action/require/impl/actions/install.lua @@ -510,9 +510,8 @@ function main(package) table.insert(deps, dep:name()) end end - local ok, errors = addon.register(package:name(), package:version_str() or "latest", + addon.register(package:name(), package:version_str() or "latest", {description = package:description(), deps = deps}) - assert(ok, errors) end installed_now = true end diff --git a/xmake/modules/private/xrepo/action/remove.lua b/xmake/modules/private/xrepo/action/remove.lua index ee078f225..eed956c6e 100644 --- a/xmake/modules/private/xrepo/action/remove.lua +++ b/xmake/modules/private/xrepo/action/remove.lua @@ -201,8 +201,7 @@ end -- remove the given installed addons function _remove_addons(names) for _, name in ipairs(names) do - local ok, errors = addon.remove(name, {force = option.get("force")}) - assert(ok, errors) + addon.remove(name, {force = option.get("force")}) cprint("${color.success}remove ${bright}%s${clear} ok!", name) end end |
