drupal icon indicating copy to clipboard operation
drupal copied to clipboard

composer always prints escape codes

Open danielcavanagh opened this issue 9 months ago • 1 comments

hiya

composer always prints escape codes when used through tooling, even when stdout isn't a terminal

i believe this is due to always passing --ansi at: https://github.com/lando/drupal/blob/9c7139c1f53c5d7bb8e8179e751033808fc3c1a1/builders/_drupaly.js#L19

escape codes only make sense when printing to a terminal, not when stdout has been redirected to a file or in command substitution. i'm trying to use the output of composer in a shell script and the escape codes are causing havoc

normally you can pass --no-ansi to disable escape codes in situations where it's needed but --ansi apparently always wins over --no-ansi

could this please be removed?

cheers 🙂

danielcavanagh avatar Feb 26 '25 10:02 danielcavanagh

Related to lando/core#345

AaronFeledy avatar May 01 '25 15:05 AaronFeledy