-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow effectively overriding isTTY
for mocking console output
#105
Comments
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to test CLIs it would be great if
termenv/termenv.go
Line 27 in 6fd0ee9
Output.tty
as a TTY or not. This is useful to provide a buffer such that any writes to anOutput
could include ANSI sequences, depending on which profile we might force. This way, if a CLI wants to test color output or maybe even varies the output based on whether it's a TTY (say, output TSV if not, or using atext/tablewriter
if it is a TTY) it can force it.E.g.
The text was updated successfully, but these errors were encountered: