diff options
| author | ruki <[email protected]> | 2025-11-21 22:34:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-21 11:28:51 +0800 |
| commit | b793f5dd2ab1a6fdfaa862a2c2ffc99f06c1c8b5 (patch) | |
| tree | c26dfc685771949b3d9fb0555927e8b8d4d84b44 /xmake/modules/async | |
| parent | 26004160d96a301b0cc2fc739413542ed6d324d6 (diff) | |
improve waiting_indicator_helper
Diffstat (limited to 'xmake/modules/async')
| -rw-r--r-- | xmake/modules/async/runjobs.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/modules/async/runjobs.lua b/xmake/modules/async/runjobs.lua index 1d5927e1d..5a5c73db3 100644 --- a/xmake/modules/async/runjobs.lua +++ b/xmake/modules/async/runjobs.lua @@ -40,7 +40,14 @@ function _init_waiting_indicator(state, opt) -- init waiting indicator helper -- we need to hide wait characters if is not a tty local waiting_indicator_opt = opt.waiting_indicator - state.show_waiting_indicator = io.isatty() and (waiting_indicator_opt == true or type(waiting_indicator_opt) == "table") + + -- compatibility: support deprecated opt.progress parameter + if opt.progress ~= nil and waiting_indicator_opt == nil then + waiting_indicator_opt = opt.progress + wprint("opt.progress is deprecated in runjobs, use opt.waiting_indicator instead") + end + + state.show_waiting_indicator = io.isatty() and (waiting_indicator_opt or type(waiting_indicator_opt) == "table") state.backnum = 0 if state.show_waiting_indicator then local indicator_opt = nil |
