Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn: how to globally disable color output

Tags:

yarnpkg

In the newer versions of the yarn package manager, almost all the commands have a --no-color option.

I'm running yarn under a continuous integration server (Jenkins) and the color escape chars pollute the output. I'd like to put something in the .yarnrc file to prevent the output of these escape chars. But I'd also to leave it on for when the developers run it on the terminal.

How to globally configure the --no-color option?

like image 504
neves Avatar asked Oct 19 '25 21:10

neves


1 Answers

In yarn >= 2 it is:

yarn config set enableColors false

or

export YARN_ENABLE_COLORS=false

or

YARN_ENABLE_COLORS=false yarn
like image 157
mrclrchtr Avatar answered Oct 22 '25 19:10

mrclrchtr