diff --git a/CHANGELOG.md b/CHANGELOG.md index a3cd5c7..7525312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) * Updated to [@lando/nginx@1.6.0](https://github.com/lando/nginx/releases/tag/v1.6.0) +* Removed `--ansi` flag from composer tooling command to prevent escape codes in redirected output ## v1.10.1 - [February 22, 2026](https://github.com/lando/wordpress/releases/tag/v1.10.1) diff --git a/builders/wordpress.js b/builders/wordpress.js index 848ef18..deb0c6c 100644 --- a/builders/wordpress.js +++ b/builders/wordpress.js @@ -88,7 +88,7 @@ const getDatabaseType = options => { const toolingDefaults = { 'composer': { service: 'appserver', - cmd: 'composer --ansi', + cmd: 'composer', }, 'db-import ': { service: ':host', diff --git a/examples/wordpress-defaults/README.md b/examples/wordpress-defaults/README.md index 1783e96..69882ab 100644 --- a/examples/wordpress-defaults/README.md +++ b/examples/wordpress-defaults/README.md @@ -56,6 +56,9 @@ lando mysql -u root -e "show variables;" | grep innodb_lock_wait_timeout | grep # Should use composer 2 by default lando exec appserver -- /bin/sh -c 'NO_COLOR=1 composer -V' | grep "Composer version 2." + +# Should not include ANSI escape codes when output is redirected +lando composer --version > /tmp/composer-output.txt 2>&1 && ! grep -P '\x1b\[' /tmp/composer-output.txt ``` ## Destroy tests