diff options
| author | ruki <[email protected]> | 2019-03-28 00:34:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-27 21:25:20 +0800 |
| commit | bb88e1beba555134a652c050f885f5e7ecf5c4a6 (patch) | |
| tree | 30e94d50c2acb1b1df331f1ef5795f66f869fdb3 | |
| parent | 34cdc300268d1eb133abd43a4bd6a4fe4e500e68 (diff) | |
improve to show package progress info
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 5 | ||||
| -rw-r--r-- | xmake/actions/require/impl/action/install.lua | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index 0822f0a08..9ce7ac026 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -33,7 +33,10 @@ import("utils.archive") function _emptychars() -- get left width - local width = os.getwinsize()["width"] or 64 + local width = os.getwinsize()["width"] - 1 + if not width or width <= 0 then + width = 64 + end -- make empty chars local emptychars = "" diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua index 759a24932..202b4b957 100644 --- a/xmake/actions/require/impl/action/install.lua +++ b/xmake/actions/require/impl/action/install.lua @@ -34,7 +34,10 @@ import(".utils.filter") function _emptychars() -- get left width - local width = os.getwinsize()["width"] or 64 + local width = os.getwinsize()["width"] - 1 + if not width or width <= 0 then + width = 64 + end -- make empty chars local emptychars = "" |
