diff options
| author | ruki <[email protected]> | 2021-12-18 23:17:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-12-18 23:17:45 +0800 |
| commit | e02a05e5fa50f21a6d4128582bf8a15141d6a763 (patch) | |
| tree | 79e7ed1eaabe8b28b15bcab32a964641ea0acc26 /xmake/modules/private/action/require/impl/install_packages.lua | |
| parent | 7be1bc272914b757a4a7fe1792f7590de4a91cdf (diff) | |
fix term mode
Diffstat (limited to 'xmake/modules/private/action/require/impl/install_packages.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/install_packages.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index 714b98461..f62a0fb52 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -268,6 +268,9 @@ function _install_packages(packages_install, packages_download, installdeps) packages_installed[tostring(instance)] = false end + -- save terminal mode for stdout, @see https://github.com/xmake-io/xmake/issues/1924 + local term_mode_stdout = tty.term_mode("stdout") + -- do install local progress_helper = show_wait and progress.new() or nil local packages_installing = {} @@ -438,6 +441,12 @@ function _install_packages(packages_install, packages_download, installdeps) end end + -- fix terminal mode to avoid some subprocess to change it + -- @see https://github.com/xmake-io/xmake/issues/1924 + if term_mode_stdout ~= tty.term_mode("stdout") then + tty.term_mode("stdout", term_mode_stdout) + end + -- trace progress_helper:clear() tty.erase_line_to_start().cr() |
