From 59dd47f6429a1162b9cdd242a9dfcfecdfedb1db Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 6 Aug 2026 00:14:19 +0800 Subject: fix plugin test --- xmake/plugins/plugin/main.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'xmake/plugins/plugin/main.lua') 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) -- cgit v1.3.1