Skip to content

Commit ac586d2

Browse files
committed
improve tips
1 parent 0bdc185 commit ac586d2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

xmake/modules/private/action/require/impl/install_packages.lua

+8-3
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ function _get_confirm_from_3rd(packages)
167167
end
168168

169169
-- get user confirm
170-
function _get_confirm(packages)
170+
function _get_confirm(packages, opt)
171+
opt = opt or {}
171172

172173
-- no confirmed packages?
173174
if #packages == 0 then
@@ -201,7 +202,11 @@ function _get_confirm(packages)
201202
end
202203

203204
-- show tips
204-
cprint("${bright color.warning}note: ${clear}install or modify (m) these packages (pass -y to skip confirm)?")
205+
if opt.toolchain then
206+
cprint("${bright color.warning}note: ${clear}install or modify (m) these ${bright}toolchain${clear} packages first (pass -y to skip confirm)?")
207+
else
208+
cprint("${bright color.warning}note: ${clear}install or modify (m) these packages (pass -y to skip confirm)?")
209+
end
205210
for reponame, packages in pairs(packages_repo) do
206211
if reponame ~= "" then
207212
print("in %s:", reponame)
@@ -758,7 +763,7 @@ function _install_packages(requires, opt)
758763
end
759764

760765
-- get user confirm
761-
local confirm, packages_modified = _get_confirm(packages_install)
766+
local confirm, packages_modified = _get_confirm(packages_install, opt)
762767
if not confirm then
763768
local packages_must = {}
764769
for _, instance in ipairs(packages_install) do

0 commit comments

Comments
 (0)