有没有办法永久关闭 Composer 的 ANSI?没有办法、Composer、ANSI

2023-09-08 08:33:59 作者:赛高

当我在 shell 中运行 Composer 时,它会将所有文本呈现为深黄色背景色,因此几乎无法阅读.

When I run Composer in my shell, it renders all of the text with a background color of dark yellow, so that it is almost impossible to read.

有一个选项可以为我运行的每个命令提供 --no-ansi 参数,但这看起来真的很痛苦.有没有办法关闭它的默认值?或者甚至将颜色更改为更易读的颜色?

There's an option to supply the --no-ansi argument with every command I run, but this really seems like a pain. Is there a way to turn it off of the default? Or even change the color to something more readable?

推荐答案

原来是因为我使用的是旧"版本的 Composer.当我尝试运行安装时,我得到了

So it turns out that it was because I was using an "old" version of Composer. When I tried to run an install, I was getting the

Warning: This development build of composer is over 30 days old. It is
recommended to update it by running "/usr/local/bin/composer self-update"
to get the latest version.

我运行 self-update,它发现在过去 30 天内甚至没有新版本,但它现在以可读的配色方案呈现.

I ran self-update, and it saw that there hadn't even been a new version in the last 30 days, but it is now rendering in a readable color scheme.

 
精彩推荐
图片推荐