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

Suppress color output when writing to something other than a terminal. #51

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

FGasper
Copy link
Collaborator

@FGasper FGasper commented Nov 22, 2024

It’s awkward to parse migration-verifier logs in editors and pagers that don’t handle ANSI escape sequences. This changeset alters migration-verifier’s logging so that it only colorizes when outputting to a terminal.

For now this causes go test’s output to be uncolorized. If it seems gainful we could put in some special escape mechanism to preserve color under go test.

@jddubois jddubois self-requested a review November 25, 2024 19:39
Copy link
Collaborator

@jddubois jddubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving for test, will revoke in a second

@jddubois jddubois self-requested a review November 25, 2024 19:40
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.

2 participants