Skip to content

How to force color in CLI output? #3351

Answered by AriPerkkio
gajus asked this question in Q&A
Discussion options

You must be logged in to vote

Does FORCE_COLOR=1 environment variable work for you? E.g:

$ FORCE_COLOR=1 pnpm test | less

> [email protected] test /x/vitest-example-project
> vitest run


ESC[7mESC[1mESC[36m RUN ESC[39mESC[22mESC[27m ESC[36mv0.31.0ESC[39m ESC[90m/x/vitest-example-projectESC[39m
....

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alexwforsythe
Comment options

Answer selected by gajus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants