Skip to content

Commit

Permalink
Suppress unnecessary warnings about ANSICON on Windows (#1561)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Wynne <[email protected]>
  • Loading branch information
yosukei3108 and mattwynne authored Jul 13, 2021
1 parent d88d9a7 commit 0d07576
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo

### Removed

- On Windows, auto-detection of ANSICON has been removed - Windows now properly supports ANSI colors in the terminal. In case of issues on older versions of Windows, execute cucumber with `--no-color`, or install [ANSICON](https://github.com/adoxa/ansicon/) globally.

### Security fixes

## [v6.1.0](https://github.com/cucumber/cucumber-ruby/compare/v6.0.0...v6.1.0)
Expand Down
7 changes: 0 additions & 7 deletions lib/cucumber/formatter/ansicolor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
require 'cucumber/platform'
require 'cucumber/term/ansicolor'

if Cucumber::WINDOWS_MRI
unless ENV['ANSICON']
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows}
Cucumber::Term::ANSIColor.coloring = false
end
end

Cucumber::Term::ANSIColor.coloring = false if !STDOUT.tty? && !ENV.key?('AUTOTEST')

module Cucumber
Expand Down

0 comments on commit 0d07576

Please sign in to comment.