-
Notifications
You must be signed in to change notification settings - Fork 1.3k
dev/sg: Disable forced TTY and forced color in NewOutput #42017
Conversation
Codenotify: Notifying subscribers in OWNERS files for diff 7f29865...e29d4b2.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you manually confirm that sg lint
, sg setup
, etc. all still work?
I also wonder whether this wasn't used for the integration tests. If so, an env war should probably be used here to overwrite the behaviour in tests.
Co-authored-by: Thorsten Ball <[email protected]>
Yes. Also: colors are working in Buildkite logs because, I think, Buildkite stdout emulates a terminal, so it looks like that's still working as intended.
I saw that we have Do you know more about how integration tests might be affected? Would this existing env var cover our needs there? |
If the tests pass, then everything should be fine :) |
Co-authored-by: Thorsten Ball <[email protected]>
Fix for the error message seen in #41838 #39687 #41507 and #42136 when running
sg
when stdout is not a terminal (e.g. when piping to another comand).Disabling
forceTTY
allows terminal detection to work and avoids callingGetWinSize
on a non-TTY.Also disable
forceColor
based on the same rationale.Worked on during sg hack hour with @mucles and @danieldides
Test plan
Before
After