summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl
diff options
context:
space:
mode:
authorruki <[email protected]>2024-11-26 22:43:06 +0800
committerruki <[email protected]>2024-11-26 22:43:06 +0800
commitc3c77df11b0a04302c7a08e69d6e9ae0208e5876 (patch)
treedc17aa195d5ab9db92cab753e0c2d1f023a1082f /xmake/modules/private/action/require/impl
parent2fef318fffae6d4638b27a4964484c2e50606137 (diff)
add installtips for package
Diffstat (limited to 'xmake/modules/private/action/require/impl')
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index 303b300d9..ba1ccdbd8 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -217,12 +217,26 @@ function _get_confirm(packages, opt)
local group = instance:group()
if group and packages_group[group] and #packages_group[group] > 1 then
for idx, package_in_group in ipairs(packages_group[group]) do
- cprint(" ${yellow}%s${clear} %s %s ${dim}%s", idx == 1 and "->" or " or", package_in_group:displayname(), package_in_group:version_str() or "", package.get_configs_str(package_in_group))
+ cprint(" ${yellow}%s${clear} %s %s ${dim}%s", idx == 1 and "->" or " or",
+ package_in_group:displayname(), package_in_group:version_str() or "",
+ package.get_configs_str(package_in_group))
+ for _, tip in ipairs(package_in_group:get("installtips")) do
+ if idx == 1 then
+ cprint(" ${yellow}*${clear} %s", tip)
+ else
+ cprint(" ${yellow}*${clear} %s", tip)
+ end
+ end
packages_showed[tostring(package_in_group)] = true
end
packages_group[group] = nil
else
- cprint(" ${yellow}->${clear} %s %s ${dim}%s", instance:displayname(), instance:version_str() or "", package.get_configs_str(instance))
+ cprint(" ${yellow}->${clear} %s %s ${dim}%s",
+ instance:displayname(), instance:version_str() or "",
+ package.get_configs_str(instance))
+ for _, tip in ipairs(instance:get("installtips")) do
+ cprint(" ${yellow}*${clear} %s", tip)
+ end
packages_showed[tostring(instance)] = true
end
end