summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-31 21:43:47 +0800
committerruki <[email protected]>2020-05-31 21:43:47 +0800
commit41bd7287e986fcf881c8d20494058c576bbcf252 (patch)
tree49d6b3d7082d87d37ff656ace7a0cd710245fda6 /xmake/actions/require/impl/package.lua
parent3c1d11faa2ca0c6e6eb1664ee938d5c49867b02d (diff)
add tty and replace clearline
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
-rw-r--r--xmake/actions/require/impl/package.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 8f7671e60..9bc25e3a4 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -24,6 +24,7 @@ import("core.base.option")
import("core.base.global")
import("core.base.hashset")
import("core.base.scheduler")
+import("core.base.tty")
import("private.async.runjobs")
import("private.utils.progress")
import("lib.detect.cache", {alias = "detectcache"})
@@ -678,7 +679,7 @@ function _install_packages(packages_install, packages_download)
-- trace
progress_helper:clear()
- utils.clearline()
+ tty.erase_line_to_start().cr()
cprintf("${yellow} => ")
if #downloading > 0 then
cprintf("downloading ${magenta}%s", table.concat(downloading, ", "))
@@ -690,7 +691,7 @@ function _install_packages(packages_install, packages_download)
progress_helper:write()
end, exit = function(errors)
if errors then
- utils.clearline()
+ tty.erase_line_to_start().cr()
io.flush()
end
end})