MinTTY/MSYS2/bash 和 sbt 显示控制字符/无富文本输出的问题

发布于 2025-01-09 15:52:34 字数 1011 浏览 1 评论 0原文

最近的更新(MinTTY/MSYS2/bash 或 sbt)开始破坏 sbt 的输出,以便在终端中显示控制字符而不是显示富文本输出:

在此处输入图像描述

从图像中可以看到从我的提示行可以看出,富文本仍然有效,但是 sbt 开始显示像 ←[0m[] 这样的控制字符。

我使用的是 Windows 11,上周运行得非常好,我的 TERM 终端设置设置为 xterm

经过一番搜索,我发现了这两篇文章:

都建议我应该尝试将我的 TERM 设置为 cygwin 但这确实不能解决问题。

问题

  1. 如何确定问题发生的位置?我高度怀疑这是内部 sbt 更新,因为它指示的版本是 1.6.0,但我去年安装的版本是 1.4.4。我刚刚尝试卸载它并通过安装程序安装 1.6.2 但问题仍然存在。

  2. 有人能解决这个问题吗?这是影响某些 CLI 的普遍现象吗?从上面的链接来看,它似乎也曾经影响过 gradle。

A recent update (of either MinTTY/MSYS2/bash or sbt) started breaking the output of sbt such that control characters are appearing instead of displaying rich text output in the terminal:

enter image description here

From the image you can see that rich text does still work as can be seen from my prompt line, but sbt started showing control characters like ←[0m[.

I'm on windows 11 and it was working perfectly fine last week, and my TERM terminal setting is set to xterm.

After some searching, I found these two posts:

both suggesting that I should try setting my TERM to cygwin but this did not solve the issue.

Question

  1. How can I isolate where the issue is happening? I highly suspect it's an internal sbt update because the version it's indicating is 1.6.0 but the version I installed was 1.4.4 last year. I just tried uninstalling it and installing 1.6.2 via the installer but the issue still persists.

  2. Does anyone have a solution to this issue? Is it a general thing that affects certain CLIs? From the links above it looks like it used to impact gradle as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

謌踐踏愛綪 2025-01-16 15:52:34

看起来是 MinTTY 或 MSYS2,因为这些更新修复了问题。

MSYS2 的工作版本:

$ cat /proc/version
MINGW64_NT-10.0-19044 version 3.3.5-341.x86_64 (@WIN-MG5BEJ9M9JD) (gcc version 11.3.0 (GCC) ) 2022-07-08 09:41 UTC

和 MinTTY:

mintty 版本

Looks like it was MinTTY or MSYS2 because an update of those fixed the issue.

Working version of MSYS2:

$ cat /proc/version
MINGW64_NT-10.0-19044 version 3.3.5-341.x86_64 (@WIN-MG5BEJ9M9JD) (gcc version 11.3.0 (GCC) ) 2022-07-08 09:41 UTC

and MinTTY:

mintty version

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文