summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-20 23:59:40 +0800
committerruki <[email protected]>2019-12-20 17:58:04 +0800
commitec7035398c3ad32ccca6d29b96895864d1802fb2 (patch)
tree2d26dfef891c86eb3f81cc55a44b15fbab75fdb3 /xmake/actions/require/impl/package.lua
parentb8ef2fa1fdf5d7dcd2b8d076f479bbfbad1a0738 (diff)
hide wait progress info when redirecting
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
-rw-r--r--xmake/actions/require/impl/package.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 8983d8ea5..4640cfaf6 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -527,6 +527,10 @@ end
-- install packages
function _install_packages(packages_install, packages_download)
+ -- we need hide wait characters if is not a tty
+ local show_wait = io.isatty()
+
+ -- do install
local waitindex = 0
local waitchars = {'\\', '-', '/', '|'}
local packages_installing = {}
@@ -630,7 +634,7 @@ function _install_packages(packages_install, packages_download)
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
+ if option.get("verbose") or not show_wait then
return
end