diff options
| author | ruki <[email protected]> | 2019-05-25 22:27:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-05-25 22:27:46 +0800 |
| commit | 62e802d3d2bd954c7c101e0eaf792125e2f9e44d (patch) | |
| tree | 4bad2876a2ffcfc2facb17bf538a90d797349ae9 /xmake/actions/require/impl/package.lua | |
| parent | 2cae1ff2dc7f1756a8a831cfde5c6610342f978f (diff) | |
improve confirm
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 93411a2c4..454b713c4 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -426,8 +426,7 @@ function _get_confirm(packages) end -- get confirm - local confirm = option.get("yes") - if confirm == nil then + local confirm = utils.confirm({default = true, description = function () -- get packages for each repositories local packages_repo = {} @@ -472,17 +471,7 @@ function _get_confirm(packages) end end end - cprint("please input: y (y/n)") - - -- get answer - io.flush() - local answer = io.read() - if answer == 'y' or answer == '' then - confirm = true - end - end - - -- ok? + end}) return confirm end |
