New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--color option does not force color output #1175

Closed
liamwhite opened this Issue Apr 14, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@liamwhite

liamwhite commented Apr 14, 2018

Background

Brakeman version: 4.2.1
Rails version: 5.1.5
Ruby version: 2.5.1

Issue

My Issue is Completely Different

Brakeman always checks if the output is a tty regardless of whether the --color option is passed.

For example, brakeman --color | less -r does not output any color codes to less.

Brakeman should use the --color option to override its heuristic of whether it should output color based on the output file being a tty.

@presidentbeef

This comment has been minimized.

Owner

presidentbeef commented Apr 16, 2018

Hi Liam,

Sure, seems like a reasonable thing to do.

The --color option was originally only introduced for people to set --no-color, which is why it does not currently work the way you would like.

presidentbeef added a commit that referenced this issue Apr 16, 2018

Allow use of --color option to force color reports
Using ANSI terminal codes.

Closes #1175

Repository owner locked and limited conversation to collaborators May 9, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.