add colors when running composer
hey guys so this is kinda an odd request. i know i sorted this problem a while ago but i totally forgot how to do it now.
i have this new centos7 server screencast.com/t/jA8z205a - where when running "composer" the display is all black and white, and i have this other server:
screencast.com/t/dZJI7eIHa - where the display is colored and the composer running commands output is colored.
i setup the second server too and i know i enabled something but i honest to god don't remember what i did to have composer colored display.
can someone give me a hint? ill be in your debt.
-
the answer came to me after i posted this thread. composer --ansi :) 0 -
Hello, I'm happy to see you were able to find the answer to your question. Thank you for updating us with the outcome. 0 -
I am still curious how you guys are doing it on cPanel though, because the way i did it was create a script that runs composer --ansi whenever i type "composer", however i see that on my cpanel box where there's composer, the colors show without me forcing --ansi : - Removed - 0 -
You can review Composer's installation file to see how they have it configured by default at: getcomposer.org/installer at master " composer/getcomposer.org " GitHub EX: /** * Sets the USE_ANSI define for colorizing output * * @param array $argv Command-line arguments */ function setUseAnsi($argv) { // --no-ansi wins over --ansi if (in_array('--no-ansi', $argv)) { define('USE_ANSI', false); } elseif (in_array('--ansi', $argv)) { define('USE_ANSI', true); } else { // On Windows, default to no ANSI, except in ANSICON and ConEmu. // Everywhere else, default to ANSI if stdout is a terminal. define( 'USE_ANSI', (DIRECTORY_SEPARATOR == '\\') ? (false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI')) : (function_exists('posix_isatty') && posix_isatty(1)) ); } } /**
Thank you.0
Please sign in to leave a comment.
Comments
4 comments