diff options
| author | ruki <[email protected]> | 2019-10-18 22:33:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-10-18 09:22:31 +0800 |
| commit | 2b075f93f9a3111d3c0439f13f77c079ba8c2ac0 (patch) | |
| tree | c0262cd6c6ae9e6b3cbc2459587ed533590aa440 /xmake/actions/require/impl/package.lua | |
| parent | 7ef0d3eac5452a5c71f0ad9f7010d376c1f70e4c (diff) | |
improve install tips
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 929397f8a..553b041ec 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -510,7 +510,7 @@ end function _install_packages(packages_install, packages_download) local waitindex = 0 - local waitchars = {'\\', '|', '/', '-'} + local waitchars = {'\\', '-', '/', '|'} local packages_installing = {} local packages_downloading = {} local packages_pending = table.copy(packages_install) @@ -609,7 +609,7 @@ function _install_packages(packages_install, packages_download) packages_installing[index] = nil packages_downloading[index] = nil - end, #packages_install, (option.get("verbose") or option.get("diagnosis")) and 1 or 4, 300, function (indices) + end, #packages_install, (option.get("verbose") or option.get("diagnosis")) and 1 or 4, 300, function (indices, tips) -- do not print progress info if be verbose if option.get("verbose") then @@ -634,14 +634,15 @@ function _install_packages(packages_install, packages_download) end -- trace - cprintf("\r${yellow} => ${clear}") + utils.clearline() + cprintf("${yellow} => ${clear}") if #downloading > 0 then cprintf("downloading ${magenta}%s${clear}", table.concat(downloading, ", ")) end if #installing > 0 then cprintf("%sinstalling ${magenta}%s${clear}", #downloading > 0 and ", " or "", table.concat(installing, ", ")) end - cprintf(" .. %s", waitchars[waitindex + 1]) + cprintf(" .. ${dim}%s${clear}%s", tips and (tips .. " ") or "", waitchars[waitindex + 1]) io.flush() end) end |
