Skip to content

Conversation

@carlpeto
Copy link
Contributor

Currently the runtime crash dump detects whether to use colour based on whether stdout is a tty, even if the crash log is going to stderr (which may not be a tty).

rdar://164566321

@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@al45tair al45tair left a comment

Choose a reason for hiding this comment

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

LGTM

@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

@carlpeto carlpeto force-pushed the fix-backtrace-stderr-color-bug branch from 196804b to a08cbef Compare November 18, 2025 12:16
@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

2 similar comments
@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

The `color=tty` setting was checking `stdout` to see if it was a TTY, but
we may be using `stderr`, in which case it's easy to end up with coloured
output in a file we're redirecting to.  Fix it to check the selected
output instead.

rdar://164624364
@carlpeto carlpeto force-pushed the fix-backtrace-stderr-color-bug branch from bb4918f to 4d57a80 Compare November 21, 2025 11:56
@carlpeto
Copy link
Contributor Author

@swift-ci please smoke test

@carlpeto
Copy link
Contributor Author

carlpeto commented Dec 1, 2025

@swift-ci please smoke test

@carlpeto carlpeto merged commit 53722a3 into swiftlang:main Dec 2, 2025
3 checks passed
@carlpeto carlpeto deleted the fix-backtrace-stderr-color-bug branch December 3, 2025 12:09
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.

3 participants