summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-18 23:41:50 +0800
committerruki <[email protected]>2024-08-23 08:14:32 +0800
commit1799d2ce7712d292c006d279e48d2c2f79894049 (patch)
tree894f6c05025b5ad877df2ba8e100c4669a5f91ef
parent73365950172878680ae5cb0235effe94eddf1586 (diff)
improve tips
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index 8b9a36cf9..38e965ca6 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -167,7 +167,8 @@ function _get_confirm_from_3rd(packages)
end
-- get user confirm
-function _get_confirm(packages)
+function _get_confirm(packages, opt)
+ opt = opt or {}
-- no confirmed packages?
if #packages == 0 then
@@ -201,7 +202,11 @@ function _get_confirm(packages)
end
-- show tips
- cprint("${bright color.warning}note: ${clear}install or modify (m) these packages (pass -y to skip confirm)?")
+ if opt.toolchain then
+ cprint("${bright color.warning}note: ${clear}install or modify (m) these ${bright}toolchain${clear} packages first (pass -y to skip confirm)?")
+ else
+ cprint("${bright color.warning}note: ${clear}install or modify (m) these packages (pass -y to skip confirm)?")
+ end
for reponame, packages in pairs(packages_repo) do
if reponame ~= "" then
print("in %s:", reponame)
@@ -758,7 +763,7 @@ function _install_packages(requires, opt)
end
-- get user confirm
- local confirm, packages_modified = _get_confirm(packages_install)
+ local confirm, packages_modified = _get_confirm(packages_install, opt)
if not confirm then
local packages_must = {}
for _, instance in ipairs(packages_install) do