diff options
| author | ruki <[email protected]> | 2026-08-08 23:17:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-09 18:28:59 +0800 |
| commit | cf62f410738a7489fe052d183bcf616ecf5f7067 (patch) | |
| tree | ea9d09e1d05c3a392e9f08688618a1a9663625b3 /xmake/modules/private/action | |
| parent | 8564ea66201d1398cb8ee5b91efc784a379c4a64 (diff) | |
add addon search
Diffstat (limited to 'xmake/modules/private/action')
| -rw-r--r-- | xmake/modules/private/action/require/search.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/search.lua b/xmake/modules/private/action/require/search.lua index e714c6c19..a0f98e0d9 100644 --- a/xmake/modules/private/action/require/search.lua +++ b/xmake/modules/private/action/require/search.lua @@ -20,6 +20,7 @@ -- imports import("core.base.task") +import("core.base.option") import("private.action.require.impl.utils.filter") import("private.action.require.impl.repository") import("private.action.require.impl.environment") @@ -41,11 +42,14 @@ function main(names) task.run("repo", {update = true}) end + -- we only search the addon packages if `--addon` is enabled + local kind = option.get("addon") and "addon" or nil + -- show title - print("The package names:") + print(kind == "addon" and "The addon names:" or "The package names:") -- search packages - for name, packages in pairs(search_packages(names)) do + for name, packages in pairs(search_packages(names, {kind = kind})) do if #packages > 0 then -- show name |
