如何修复VSCODE GIT日志中编码的ANSI颜色?

发布于 2025-02-07 20:03:07 字数 1337 浏览 2 评论 0原文

我正在尝试运行一个固定棉布的预制挂钩。当我使用Windows PowerShell提交分阶段文件时,我会得到以下结果:

但是当我尝试提交文件vscode源控制时,它将结果输出到GIT日志,看起来像这样:

您知道如何修复此不良编码?我怀疑它发生了,因为它可能缺少ANSI颜色支持。 我发现了一些相关主题:

  1. 问题/38834#issuecomment-454798872 (我尝试了建议的扩展名,但对我不起作用)。
  2. https://laracasts.com/discuss/channels/general-discussion/cannot-get-get-ansi-colors-to-work-work-work-work-in-vs-code-code-code-git-bash-integrated-integrated-terminal-terminal-terminal
  3. < a href =“ https://stackoverflow.com/questions/71362968/ansi-colors-dont-work-work-in-vscode-integrated-terminal”> ansi颜色在VSCODE INTEGRATED ENSTINAL中不起作用

谢谢

I'm trying to run a pre-commit hook that runs lint-staged. When I commit my staged files using Windows PowerShell, I get the following result:
Result of lint-staged on Windows powershell

But when I try to commit the files VScode Source Control, it outputs the result to Git Log, which looks like this:
Result of lint-staged on Git Log

Do you know how can I fix this bad encoding? I suspect that it happens because it probably missing ANSI colors support.
I found some related topics:

  1. https://github.com/microsoft/vscode/issues/38834#issuecomment-454798872 (I tried the suggested extension, but it didn't work for me).
  2. https://laracasts.com/discuss/channels/general-discussion/cannot-get-ansi-colors-to-work-in-vs-code-git-bash-integrated-terminal
  3. ANSI colors don't work in VSCode integrated terminal

Thanks

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文