Skip to content

Disable color for formatter file output#1886

Open
StantonMatt wants to merge 1 commit into
cucumber:mainfrom
StantonMatt:fix-file-formatter-color
Open

Disable color for formatter file output#1886
StantonMatt wants to merge 1 commit into
cucumber:mainfrom
StantonMatt:fix-file-formatter-color

Conversation

@StantonMatt

Copy link
Copy Markdown
Contributor

Description

Addresses the default formatter-output behavior from #1288.

Console formatters now decide default coloring from their own output stream. That means a command like --format pretty --out pretty.txt --format progress can keep the progress formatter colored on a TTY while writing plain text to pretty.txt.

Explicit --color and --no-color still override the output destination.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Tests have been added for any changes to behaviour of the code
  • bundle exec rubocop reports no offenses
  • CHANGELOG.md has been updated

Checked locally:

  • bundle exec rspec
  • bundle exec cucumber --publish-quiet
  • bundle exec rspec spec/cucumber/formatter/console_spec.rb spec/cucumber/formatter/console_counts_spec.rb spec/cucumber/cli/configuration_spec.rb
  • bundle exec rspec compatibility/spec -f d
  • bundle exec rubocop

@StantonMatt StantonMatt force-pushed the fix-file-formatter-color branch from 3ea5cde to b074398 Compare June 3, 2026 17:16
Signed-off-by: Matthew Stanton <stantonmatthewj@gmail.com>
@StantonMatt StantonMatt force-pushed the fix-file-formatter-color branch from b074398 to 1ed40df Compare June 4, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant