uv icon indicating copy to clipboard operation
uv copied to clipboard

uv --color=never shows colors :)

Open mattiasb opened this issue 1 year ago • 2 comments

If I run uv --color=never --help the help output is still full of colors. :)

Screenshot from 2024-09-09 17-14-25

This is on uv 0.4.7 FWIW.

mattiasb avatar Sep 09 '24 15:09 mattiasb

cc @blueraft

Introduced in https://github.com/astral-sh/uv/pull/6280

zanieb avatar Sep 09 '24 15:09 zanieb

Uh oh, sorry. I will take a look!

blueraft avatar Sep 09 '24 15:09 blueraft

I've stumbled upon another manifestation of the issue. Despite the --color=never option is provided, it's ignored when an error is displayed:

> uv --color never                                                                                  
←[1m←[31merror:←[0m '←[33muv←[0m' requires a subcommand but one was not provided                                                
  [subcommands: ←[32mrun←[0m, ←[32minit←[0m, ←[32madd←[0m, ←[32mremove←[0m, ←[32msync←[0m, ←[32mlock←[0m, ←[32mexport←[0m, ←[32m
tree←[0m, ←[32mtool←[0m, ←[32mpython←[0m, ←[32mpip←[0m, ←[32mvenv←[0m, ←[32mvirtualenv←[0m, ←[32mv←[0m, ←[32mbuild←[0m, ←[32mpub
lish←[0m, ←[32mbuild-backend←[0m, ←[32mcache←[0m, ←[32mself←[0m, ←[32mclean←[0m, ←[32mversion←[0m, ←[32mgenerate-shell-completio
n←[0m, ←[32m--generate-shell-completion←[0m, ←[32mhelp←[0m]                                                                     

←[1m←[32mUsage:←[0m ←[1m←[36muv←[0m ←[36m[OPTIONS]←[0m ←[36m<COMMAND>←[0m                                                       

For more information, try '←[1m←[36m--help←[0m'.                                                                                

However, NO_COLOR=1 works fine now, in uv 0.4.25 (97eb6ab4a 2024-10-21).

StSav012 avatar Oct 23 '24 10:10 StSav012

Thanks for catching that @StSav012, I've added a fix for that in the linked PR

Screenshot 2024-10-23 at 12 56 27

blueraft avatar Oct 23 '24 10:10 blueraft

In case it helps I think this is another manifestation of the bug

Image Image

dandavison avatar Apr 06 '25 21:04 dandavison