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

Add SuperDiff::Configuration#color_enabled= #138

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

knu
Copy link
Contributor

@knu knu commented Jun 12, 2021

Currently, you need to use merge!(), which doesn't look pretty.

SuperDiff.configure do |config|
  config.merge!(color_enabled: false) if ENV['CIRCLECI'] # because the log is not colorized when it is too huge
end

@mcmire mcmire self-assigned this Jun 12, 2021
@morissetcl
Copy link

morissetcl commented Aug 10, 2021

The following config should works ?

SuperDiff::Csi.color_enabled = false if ENV["CI"]

@mcmire
Copy link
Collaborator

mcmire commented Aug 10, 2021

@morissetcl Yes, that is a quick fix for now.

@knu Sorry I didn't see this when you initially created it. Would you mind repushing your branch? For some reason none of the GitHub Actions ran. You might try running git rebase master to refresh the commit you have and then force-pushing.

@knu
Copy link
Contributor Author

knu commented Aug 11, 2021

I have recreated the commit and force-pushed. Does this work?

@mcmire
Copy link
Collaborator

mcmire commented Aug 11, 2021

Yup! Running CI now.

@petergoldstein
Copy link
Contributor

@knu You probably need to rebase against main at this point.

@mcmire mcmire merged commit 991b1b6 into splitwise:main Feb 10, 2023
@mcmire
Copy link
Collaborator

mcmire commented Feb 10, 2023

Sorry for not getting to this sooner @knu, thanks for the PR!

@knu knu deleted the add_color_enabled_setter branch February 11, 2023 03:10
@sshaw
Copy link
Contributor

sshaw commented Mar 7, 2023

Shouldn't this check be changed: https://github.com/mcmire/super_diff/blob/fb6718a2b60bc8135424295cc069a4b984983f77/lib/super_diff/configuration.rb#L146

if ENV["CI"] == "true" we do not want color, right?

@sshaw
Copy link
Contributor

sshaw commented Mar 7, 2023

Nevertheless, can we get a release for the config.color_enabled addition? :)

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.

5 participants