Skip to content
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 is not getting completely disabled #82

Closed
mcmire opened this issue May 13, 2020 · 2 comments · Fixed by #167
Closed

Color is not getting completely disabled #82

mcmire opened this issue May 13, 2020 · 2 comments · Fixed by #167

Comments

@mcmire
Copy link
Collaborator

mcmire commented May 13, 2020

When disabling color, it seems that it does remove the escape codes from the diff, but not from the "Diff" header or the key.

@magni-
Copy link

magni- commented Dec 1, 2022

Could this be from this line?
https://github.com/mcmire/super_diff/blob/v0.9.0/lib/super_diff/rspec/monkey_patches.rb#L75

-            if RSpec.configuration.color_enabled? && code = console_code_for(code_or_symbol)
+            if SuperDiff.configuration.color_enabled? && code = console_code_for(code_or_symbol)

@mcmire
Copy link
Collaborator Author

mcmire commented Dec 1, 2022

Yeah, we'd want to confirm in a test, but I think that may be it.

mcmire pushed a commit that referenced this issue Feb 10, 2023
Disabling color only applies to the diff, not the header and the key. Disabling color is needed for my team, because we use CircleCI which can show color sometimes, and remove it at other times (I believe based on the length of the log). And in the later case, we're seeing ansi color codes. I have confirmed the change proposed in #82 allows us to disable color in all of the output.
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 a pull request may close this issue.

2 participants