summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2026-08-06 00:14:19 +0800
committerruki <[email protected]>2026-08-06 00:14:19 +0800
commit59dd47f6429a1162b9cdd242a9dfcfecdfedb1db (patch)
tree4f3560aaaca4f2099cdc854bb83f0466f1905b14 /xmake
parent5c68815ee523bb6fff7d285016e57efbc88d483a (diff)
fix plugin test
Diffstat (limited to 'xmake')
-rw-r--r--xmake/core/package/package.lua2
-rw-r--r--xmake/plugins/plugin/main.lua14
2 files changed, 14 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 59c11b2cb..e014d9578 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -3160,7 +3160,7 @@ end
-- - plat: the given platform, we need to set it to the description scope at same time,
-- e.g. add_requires("zlib~mingw", {plat = "mingw"})
-- @see https://github.com/orgs/xmake-io/discussions/3439
--- - arch: the given architecture, ditto
+-- - arch: the given architecture, it's the same as `opt.plat`
-- - repo: the repository instance which this package belongs to
--
-- @return the package instance and errors
diff --git a/xmake/plugins/plugin/main.lua b/xmake/plugins/plugin/main.lua
index fde93547a..facbc0b4c 100644
--- a/xmake/plugins/plugin/main.lua
+++ b/xmake/plugins/plugin/main.lua
@@ -54,7 +54,19 @@ function _install_plugins_from_repo(name, reponame)
if reponame then
installname = reponame .. "@" .. name
end
- os.execv(os.programfile(), {"lua", "private.xrepo", "install", "--plugin", installname})
+ local argv = {"lua", "private.xrepo", "install", "--plugin"}
+ -- we need to pass the common options to the sub-process, e.g. -y, -v, -D
+ if option.get("yes") then
+ table.insert(argv, "-y")
+ end
+ if option.get("verbose") then
+ table.insert(argv, "-v")
+ end
+ if option.get("diagnosis") then
+ table.insert(argv, "-D")
+ end
+ table.insert(argv, installname)
+ os.execv(os.programfile(), argv)
end
-- install a single plugin from a source directory (as the given name, default to the directory name)