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

Disable the colors when stdout isn't a tty #1508

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Conversation

thufschmitt
Copy link
Contributor

@thufschmitt thufschmitt commented Aug 7, 2023

Fix #1500

The test is probably wrong. I'll try and make it correct, but if there's a better way of writing it, please let me know.

@github-actions github-actions bot temporarily deployed to pull request August 7, 2023 15:40 Inactive
@yannham
Copy link
Member

yannham commented Aug 7, 2023

FYI, clippy is complaining. As a oneliner, you can run:

cargo clippy --all-targets --workspace -- --deny warnings --allow clippy::new-without-default --allow clippy::match_like_matches_macro

to reproduce what the CI is doing. We discussed just today that the developer environment didn't give proper access to clippy, because it's not in the pre-commit hooks anymore 😅 that should be fixed, but in the meantime, this is the script I use

@thufschmitt
Copy link
Contributor Author

Fixed the clippy warning, and made the test actually test something (by grepping for the correct string and in the right stream). Should be much better now

@thufschmitt thufschmitt marked this pull request as ready for review August 8, 2023 06:10
@github-actions github-actions bot temporarily deployed to pull request August 8, 2023 06:13 Inactive
cli/tests/integration/main.rs Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pull request August 8, 2023 08:29 Inactive
@thufschmitt thufschmitt added this pull request to the merge queue Aug 8, 2023
Merged via the queue into master with commit 5572b44 Aug 8, 2023
5 checks passed
@thufschmitt thufschmitt deleted the no-color-if-no-tty branch August 8, 2023 09:27
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.

--color=auto isn't respected for error messages
3 participants