summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/install_packages.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-26 00:57:23 +0800
committerruki <[email protected]>2021-05-27 09:56:31 +0800
commit01542ad5a23b35cccf9ca6abc6fcb33c6512219e (patch)
tree7804f3d04eac2741b2e8d1371cc2a18c4399bd4d /xmake/modules/private/action/require/impl/install_packages.lua
parentcabfdf44c5b08ad2dfeb425eb5e372cbff6c37fe (diff)
add get confirm stub from 3rd
Diffstat (limited to 'xmake/modules/private/action/require/impl/install_packages.lua')
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index e2d97e2f3..ac3a16f6c 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -46,6 +46,10 @@ function _sort_packages_urls(packages)
end
end
+-- get user confirm from 3rd package sources
+function _get_confirm_from_3rd(packages)
+end
+
-- get user confirm
function _get_confirm(packages)
@@ -100,7 +104,22 @@ function _get_confirm(packages)
end
end
end
+ end, answer = function ()
+ cprint("please input: ${bright}y${clear} (y/n/more)")
+ io.flush()
+ return (io.read() or "false"):trim()
end})
+
+ -- more? get confirm from 3rd package sources
+ if confirm == "more" or confirm == "m" then
+ return _get_confirm_from_3rd(packages)
+ end
+
+ -- get confirm result
+ confirm = option.boolean(confirm)
+ if type(confirm) ~= "boolean" then
+ confirm = true
+ end
return confirm
end