MinTTY/MSYS2/bash 和 sbt 显示控制字符/无富文本输出的问题
最近的更新(MinTTY/MSYS2/bash 或 sbt)开始破坏 sbt 的输出,以便在终端中显示控制字符而不是显示富文本输出:
从图像中可以看到从我的提示行可以看出,富文本仍然有效,但是 sbt 开始显示像 ←[0m[
] 这样的控制字符。
我使用的是 Windows 11,上周运行得非常好,我的 TERM
终端设置设置为 xterm
。
经过一番搜索,我发现了这两篇文章:
都建议我应该尝试将我的 TERM
设置为 cygwin
但这确实不能解决问题。
问题
如何确定问题发生的位置?我高度怀疑这是内部 sbt 更新,因为它指示的版本是 1.6.0,但我去年安装的版本是 1.4.4。我刚刚尝试卸载它并通过安装程序安装
1.6.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:
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
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 was1.4.4
last year. I just tried uninstalling it and installing1.6.2
via the installer but the issue still persists.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来是 MinTTY 或 MSYS2,因为这些更新修复了问题。
MSYS2 的工作版本:
和 MinTTY:
Looks like it was MinTTY or MSYS2 because an update of those fixed the issue.
Working version of MSYS2:
and MinTTY: